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

Consistently modify CMAKE_MODULE_PATH

This should happen for both add_subdirectory() as well as find_package()
calls. Nothing should be included either way. The consuming project
decides, what should be included.
parent 4c031e07
Branches
Tags
No related merge requests found
......@@ -39,6 +39,10 @@ option(LoadStaticSharedTargets_INCLUDE_PACKAGING "Include packaging rules for Lo
add_subdirectory(src)
if (NOT IS_TOP_LEVEL)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" PARENT_SCOPE)
endif ()
if (IS_TOP_LEVEL AND BUILD_TESTING)
add_subdirectory(tests)
endif ()
......
......@@ -26,3 +26,5 @@ SOFTWARE.
add_custom_target(LoadStaticSharedTargets ALL)
add_subdirectory(cmake)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" PARENT_SCOPE)
......@@ -25,4 +25,5 @@ SOFTWARE.
target_sources(LoadStaticSharedTargets PRIVATE LoadStaticSharedTargets.cmake)
include(LoadStaticSharedTargets.cmake)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" PARENT_SCOPE)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment