Commit eb2fa71 1 parent 6760ea3 commit eb2fa71 Copy full SHA for eb2fa71
File tree 1 file changed +15
-3
lines changed
1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -55,11 +55,23 @@ option(HPP_FCL_ENABLE_LOGGING "Activate logging for warnings or error messages.
55
55
56
56
# Check if the submodule cmake have been initialized
57
57
set (JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR} /cmake" )
58
- if (NOT EXISTS "${CMAKE_SOURCE_DIR} /cmake/base.cmake" )
59
- if (${CMAKE_VERSION} VERSION_LESS "3.14.0" )
58
+ if (EXISTS "${JRL_CMAKE_MODULES} /base.cmake" )
59
+ message (STATUS "JRL cmakemodules found in 'cmake/' git submodule" )
60
+ else ()
61
+ find_package (jrl-cmakemodules QUIET CONFIG)
62
+ if (jrl-cmakemodules_FOUND)
63
+ get_property (
64
+ JRL_CMAKE_MODULES
65
+ TARGET jrl-cmakemodules::jrl-cmakemodules
66
+ PROPERTY INTERFACE_INCLUDE_DIRECTORIES )
67
+ message (STATUS "JRL cmakemodules found on system at ${JRL_CMAKE_MODULES} " )
68
+ elseif (${CMAKE_VERSION} VERSION_LESS "3.14.0" )
60
69
message (
61
70
FATAL_ERROR
62
- "\n Please run the following command first:\n git submodule update --init\n "
71
+ "\n Can't find jrl-cmakemodules. Please either:\n "
72
+ " - use git submodule: 'git submodule update --init'\n "
73
+ " - or install https://github.com/jrl-umi3218/jrl-cmakemodules\n "
74
+ " - or upgrade your CMake version to >= 3.14 to allow automatic fetching\n "
63
75
)
64
76
else ()
65
77
message (STATUS "JRL cmakemodules not found. Let's fetch it." )
You can’t perform that action at this time.
0 commit comments