diff --git a/CMakeLists.txt b/CMakeLists.txt index fd5cd3b3..692276af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,9 @@ option( include(GNUInstallDirs) set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) -if(NOT BEMAN_EXECUTION_ENABLE_INSTALL OR CMAKE_SKIP_INSTALL_RULES) +if(PROJECT_IS_TOP_LEVEL AND NOT BEMAN_EXECUTION_ENABLE_INSTALL OR CMAKE_SKIP_INSTALL_RULES) + set(CMAKE_SKIP_INSTALL_RULES ON) + include(FetchContent) # Add project_options from https://github.com/aminya/project_options diff --git a/tests/beman/execution/CMakeLists.txt b/tests/beman/execution/CMakeLists.txt index 2e218822..c6e28865 100644 --- a/tests/beman/execution/CMakeLists.txt +++ b/tests/beman/execution/CMakeLists.txt @@ -114,6 +114,7 @@ if(PROJECT_IS_TOP_LEVEL) if(beman_execution_FOUND) set(execution_tests exec-awaitable.test) # only one sample to save time! CK else() + set(BEMAN_EXECUTION_ENABLE_INSTALL ON) add_subdirectory(../../.. beman_execution) include(CMakePrintHelpers)