2024-04-29 21:27:41 +02:00
|
|
|
diff --git a/include/BoostRoot.cmake b/include/BoostRoot.cmake
|
|
|
|
index e93f90712..063032e8a 100644
|
|
|
|
--- a/include/BoostRoot.cmake
|
|
|
|
+++ b/include/BoostRoot.cmake
|
|
|
|
@@ -21,7 +21,7 @@ set(__boost_incompatible_libraries "")
|
|
|
|
|
|
|
|
# Define cache variables if root project
|
|
|
|
|
|
|
|
-if(CMAKE_SOURCE_DIR STREQUAL Boost_SOURCE_DIR)
|
|
|
|
+if(1)
|
|
|
|
|
|
|
|
# --with-<library>
|
|
|
|
set(BOOST_INCLUDE_LIBRARIES "" CACHE STRING
|
2024-10-18 23:59:30 +03:00
|
|
|
@@ -200,6 +200,7 @@ endfunction()
|
2024-04-29 21:27:41 +02:00
|
|
|
function(__boost_scan_dependencies lib var)
|
|
|
|
|
|
|
|
set(result "")
|
|
|
|
+ set(required_components "")
|
|
|
|
|
|
|
|
if(EXISTS "${BOOST_SUPERPROJECT_SOURCE_DIR}/libs/${lib}/CMakeLists.txt")
|
|
|
|
|
2024-10-18 23:59:30 +03:00
|
|
|
@@ -209,7 +209,8 @@ function(__boost_scan_dependencies lib var)
|
2024-04-29 21:27:41 +02:00
|
|
|
foreach(line IN LISTS data)
|
|
|
|
|
|
|
|
if(line MATCHES "^[ ]*Boost::([A-Za-z0-9_]+)[ ]*$")
|
|
|
|
|
|
|
|
+ list(APPEND required_components ${CMAKE_MATCH_1})
|
|
|
|
string(REGEX REPLACE "^numeric_" "numeric/" dep ${CMAKE_MATCH_1})
|
|
|
|
list(APPEND result ${dep})
|
|
|
|
|
2024-10-18 23:59:30 +03:00
|
|
|
@@ -218,13 +218,18 @@ function(__boost_scan_dependencies lib var)
|
2024-04-29 21:27:41 +02:00
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
+ list(REMOVE_DUPLICATES required_components)
|
|
|
|
+ list(REMOVE_ITEM required_components boost ${lib}) # due to property_tree and python
|
|
|
|
+ if(required_components)
|
|
|
|
+ find_package(Boost COMPONENTS ${required_components} REQUIRED CONFIG)
|
|
|
|
+ endif()
|
|
|
|
set(${var} ${result} PARENT_SCOPE)
|
|
|
|
|
|
|
|
endfunction()
|
|
|
|
|
2024-10-18 23:59:30 +03:00
|
|
|
macro(__boost_add_header_only lib)
|
2024-04-29 21:27:41 +02:00
|
|
|
|
2024-10-18 23:59:30 +03:00
|
|
|
if(TARGET "boost_${lib}" AND TARGET "Boost::${lib}")
|
2024-04-29 21:27:41 +02:00
|
|
|
|
2024-10-18 23:59:30 +03:00
|
|
|
get_target_property(__boost_lib_type "boost_${lib}" TYPE)
|
2024-04-29 21:27:41 +02:00
|
|
|
|
|
|
|
@@ -251,13 +256,13 @@ while(__boost_libs_to_scan)
|
|
|
|
|
|
|
|
list(REMOVE_DUPLICATES __boost_dependencies)
|
|
|
|
|
|
|
|
- set(__boost_libs_to_scan ${__boost_dependencies})
|
|
|
|
|
|
|
|
if(__boost_libs_to_scan)
|
|
|
|
list(REMOVE_ITEM __boost_libs_to_scan ${__boost_include_libraries})
|
|
|
|
+ list(REMOVE_ITEM __boost_libs_to_scan ${__boost_lib})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
list(APPEND __boost_include_libraries ${__boost_libs_to_scan})
|
|
|
|
|
|
|
|
endwhile()
|
|
|
|
|
|
|
|
@@ -362,13 +367,14 @@ if(CMAKE_SKIP_INSTALL_RULES)
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
+if(0)
|
|
|
|
set(CONFIG_INSTALL_DIR "${BOOST_INSTALL_CMAKEDIR}/Boost-${BOOST_SUPERPROJECT_VERSION}")
|
|
|
|
set(CONFIG_FILE_NAME "${CMAKE_CURRENT_LIST_DIR}/../config/BoostConfig.cmake")
|
|
|
|
|
|
|
|
install(FILES "${CONFIG_FILE_NAME}" DESTINATION "${CONFIG_INSTALL_DIR}")
|
|
|
|
|
|
|
|
set(CONFIG_VERSION_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/tmpinst/BoostConfigVersion.cmake")
|
|
|
|
|
|
|
|
if(NOT CMAKE_VERSION VERSION_LESS 3.14)
|
|
|
|
|
|
|
|
write_basic_package_version_file("${CONFIG_VERSION_FILE_NAME}" COMPATIBILITY SameMajorVersion ARCH_INDEPENDENT)
|
|
|
|
@@ -385,3 +392,4 @@ else()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
install(FILES "${CONFIG_VERSION_FILE_NAME}" DESTINATION "${CONFIG_INSTALL_DIR}")
|
|
|
|
+endif()
|
|
|
|
\ No newline at end of file
|