File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,23 @@ set(PROJECT_COMPATIBILITY_VERSION AnyNewerVersion)
1414
1515# Check if the submodule cmake have been initialized
1616set (JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR} /cmake" )
17- if (NOT EXISTS "${CMAKE_SOURCE_DIR} /cmake/base.cmake" )
18- if (${CMAKE_VERSION} VERSION_LESS "3.14.0" )
17+ if (EXISTS "${JRL_CMAKE_MODULES} /base.cmake" )
18+ message (STATUS "JRL cmakemodules found in 'cmake/' git submodule" )
19+ else ()
20+ find_package (jrl-cmakemodules QUIET CONFIG)
21+ if (jrl-cmakemodules_FOUND)
22+ get_property (
23+ JRL_CMAKE_MODULES
24+ TARGET jrl-cmakemodules::jrl-cmakemodules
25+ PROPERTY INTERFACE_INCLUDE_DIRECTORIES )
26+ message (STATUS "JRL cmakemodules found on system at ${JRL_CMAKE_MODULES} " )
27+ elseif (${CMAKE_VERSION} VERSION_LESS "3.14.0" )
1928 message (
2029 FATAL_ERROR
21- "\n Please run the following command first:\n git submodule update --init\n "
30+ "\n Can't find jrl-cmakemodules. Please either:\n "
31+ " - use git submodule: 'git submodule update --init'\n "
32+ " - or install https://github.com/jrl-umi3218/jrl-cmakemodules\n "
33+ " - or upgrade your CMake version to >= 3.14 to allow automatic fetching\n "
2234 )
2335 else ()
2436 message (STATUS "JRL cmakemodules not found. Let's fetch it." )
You can’t perform that action at this time.
0 commit comments