Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions cmake/Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@
set(_Libmultiprocess_supported_components Bin Lib)

# If no components specified, include all components.
list(LENGTH Libmultiprocess_FIND_COMPONENTS Libmultiprocess_FIND_COMPONENTS_len)
if(Libmultiprocess_FIND_COMPONENTS_len EQUAL 0)
set(Libmultiprocess_FIND_COMPONENTS ${_Libmultiprocess_supported_components})
list(LENGTH ${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS ${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS_len)
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS_len EQUAL 0)
set(${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS ${_Libmultiprocess_supported_components})
endif()

if ("Bin" IN_LIST Libmultiprocess_FIND_COMPONENTS)
if ("Bin" IN_LIST ${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS)
include("${CMAKE_CURRENT_LIST_DIR}/TargetCapnpSources.cmake")
endif()

if ("Lib" IN_LIST Libmultiprocess_FIND_COMPONENTS)
if ("Lib" IN_LIST ${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS)
include(CMakeFindDependencyMacro)
find_dependency(CapnProto)
endif()

foreach(_comp ${Libmultiprocess_FIND_COMPONENTS})
foreach(_comp ${${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS})
if (NOT _comp IN_LIST _Libmultiprocess_supported_components)
set(Libmultiprocess_FOUND False)
set(Libmultiprocess_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}")
set(${CMAKE_FIND_PACKAGE_NAME}_FOUND False)
set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}")
endif()
include("${CMAKE_CURRENT_LIST_DIR}/${_comp}Targets.cmake")
endforeach()