File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,28 @@ set(CXX_DISABLE_WERROR TRUE)
3535set (CMAKE_VERBOSE_MAKEFILE TRUE )
3636set (PROJECT_CUSTOM_HEADER_EXTENSION "hpp" )
3737
38+ # Check if the submodule cmake have been initialized
39+ set (JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR} /cmake" )
40+ if (NOT EXISTS "${CMAKE_SOURCE_DIR} /cmake/base.cmake" )
41+ if (${CMAKE_VERSION} VERSION_LESS "3.14.0" )
42+ message (
43+ FATAL_ERROR
44+ "\n Please run the following command first:\n git submodule update --init\n "
45+ )
46+ else ()
47+ message (STATUS "JRL cmakemodules not found. Let's fetch it." )
48+ include (FetchContent)
49+ FetchContent_Declare(
50+ "jrl-cmakemodules"
51+ GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git" )
52+ FetchContent_MakeAvailable("jrl-cmakemodules" )
53+ FetchContent_GetProperties("jrl-cmakemodules" SOURCE_DIR JRL_CMAKE_MODULES)
54+ endif ()
55+ endif ()
56+
3857# JRL-cmakemodule setup
39- include (cmake /base.cmake)
40- include (cmake /boost.cmake)
58+ include (" ${JRL_CMAKE_MODULES} /base.cmake" )
59+ include (" ${JRL_CMAKE_MODULES} /boost.cmake" )
4160
4261# Project definition
4362compute_project_args(PROJECT_ARGS LANGUAGES CXX)
You can’t perform that action at this time.
0 commit comments