Squashed 'cmake/cable/' changes from 945b7e5..3fb12ab
Cable 0.4.4
Fix Cable modules not being in CMAKE_MODULE_PATH
git-subtree-dir: cmake/cable
git-subtree-split:
#
# This is internal variable automatically updated with external tools.
# Use CABLE_VERSION variable if you need this information.
-set(version 0.4.3)
+set(version 0.4.4)
# For convenience, add the project CMake module dir to module path.
set(module_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
@@ -18,6 +18,9 @@ if(EXISTS ${module_dir})
list(APPEND CMAKE_MODULE_PATH ${module_dir})
endif()
+# Always add this Cable instance modules to the CMake module path.
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
+
if(CABLE_VERSION)
# Some other instance of Cable has been initialized in the top project.
@@ -61,9 +64,6 @@ set(CABLE_VERSION ${version})
# Mark this project as non-nested.
set(PROJECT_IS_NESTED FALSE)
-# Add Cable modules to the CMake module path.
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
-
cable_log("Cable ${CABLE_VERSION} initialized")
cable_debug("Project CMake modules directory: ${module_dir}")
