Skip to content
Snippets Groups Projects
Unverified Commit 2df5cd46 authored by Tim Kaune's avatar Tim Kaune
Browse files

Refactor top-level-check in root CMakeLists

parent bb732143
No related branches found
No related tags found
No related merge requests found
...@@ -34,6 +34,8 @@ project(LoadStaticSharedTargets VERSION 1.3.0 LANGUAGES NONE) ...@@ -34,6 +34,8 @@ project(LoadStaticSharedTargets VERSION 1.3.0 LANGUAGES NONE)
include(GNUInstallDirs) include(GNUInstallDirs)
string(COMPARE EQUAL "${CMAKE_PROJECT_NAME}" "${PROJECT_NAME}" IS_TOP_LEVEL)
# LoadStaticSharedTargets is a CMake script, which we never want to debug # LoadStaticSharedTargets is a CMake script, which we never want to debug
# If using a multi config generator # If using a multi config generator
if (GENERATOR_IS_MULTI_CONFIG) if (GENERATOR_IS_MULTI_CONFIG)
...@@ -46,8 +48,7 @@ endif () ...@@ -46,8 +48,7 @@ endif ()
add_subdirectory(src) add_subdirectory(src)
string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}" is_top_level) option(LoadStaticSharedTargets_INCLUDE_PACKAGING "Include packaging rules for LoadStaticSharedTargets" "${IS_TOP_LEVEL}")
option(LoadStaticSharedTargets_INCLUDE_PACKAGING "Include packaging rules for LoadStaticSharedTargets" "${is_top_level}")
if (LoadStaticSharedTargets_INCLUDE_PACKAGING) if (LoadStaticSharedTargets_INCLUDE_PACKAGING)
add_subdirectory(packaging) add_subdirectory(packaging)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment