On Jun 24, 2017, at 4:19 PM, Peter Dimov via Boost
wrote: P F wrote:
No, you just do `include` instead of `add_subdirectory`, but it doesn’t require installation.
I'm not sure I understand. find_package(BCM) is unconditional in CMakeLists.txt, right?
https://github.com/pfultz2/boost-cmake-demo/blob/bcm-demo/libs/system/CMakeL...
Yes, but in the superproject I exclude it: macro(find_package NAME) if(NOT "${NAME}" MATCHES "^boost_.*$" AND NOT "${NAME}" STREQUAL BCM) _find_package(${ARGV}) endif() endmacro() Alternatively, in the superproject I could append the cmake prefix path: list(APPEND CMAKE_PREFIX_PATH bcm) Which would make `find_package(BCM)` work in the subprojects, and the include would not be needed. This might be a better approach.
What 'include` do you do and where?
Thats the `include(bcm/share/bcm/cmake/BCMConfig.cmake)`, here: https://github.com/pfultz2/boost-cmake-demo/blob/bcm-demo/CMakeLists.txt#L11
Unrelated, why do you need `include(GNUInstallDirs)` here:
https://github.com/pfultz2/boost-cmake-demo/blob/bcm-demo/bcm/share/bcm/cmak...
?
Its not needed. I think originally I was going to use that module for the install directories.