mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 11:17:54 +00:00
[all] cmake: tell users to clone submodules when they haven't
This gives users a command to run that will automagically fix the submodule situation, and should reduce the amount of support requests.
This commit is contained in:
parent
1021c9ce92
commit
5a906131eb
4 changed files with 11 additions and 0 deletions
|
@ -4,6 +4,7 @@ project(looking-glass-client C CXX)
|
|||
get_filename_component(PROJECT_TOP "${PROJECT_SOURCE_DIR}/.." ABSOLUTE)
|
||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_TOP}/cmake/" "${PROJECT_SOURCE_DIR}/cmake/")
|
||||
|
||||
include(CheckSubmodule)
|
||||
include(GNUInstallDirs)
|
||||
include(CheckCCompilerFlag)
|
||||
include(FeatureSummary)
|
||||
|
|
8
cmake/CheckSubmodule.cmake
Normal file
8
cmake/CheckSubmodule.cmake
Normal file
|
@ -0,0 +1,8 @@
|
|||
if (EXISTS "${PROJECT_TOP}/.git" AND (
|
||||
(NOT EXISTS "${PROJECT_TOP}/repos/cimgui/.git") OR
|
||||
(NOT EXISTS "${PROJECT_TOP}/repos/LGMP/.git") OR
|
||||
(NOT EXISTS "${PROJECT_TOP}/repos/PureSpice/.git") OR
|
||||
(NOT EXISTS "${PROJECT_TOP}/repos/cimgui/imgui/.git")
|
||||
))
|
||||
message(FATAL_ERROR "Submodules are not initialized. Run\n\tgit submodule update --init --recursive")
|
||||
endif()
|
|
@ -7,6 +7,7 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG" CACHE STRING "compiler flag
|
|||
get_filename_component(PROJECT_TOP "${PROJECT_SOURCE_DIR}/.." ABSOLUTE)
|
||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_TOP}/cmake/" "${PROJECT_SOURCE_DIR}/cmake/")
|
||||
|
||||
include(CheckSubmodule)
|
||||
include(GNUInstallDirs)
|
||||
include(CheckCCompilerFlag)
|
||||
include(FeatureSummary)
|
||||
|
|
|
@ -4,6 +4,7 @@ project(looking-glass-obs C)
|
|||
get_filename_component(PROJECT_TOP "${PROJECT_SOURCE_DIR}/.." ABSOLUTE)
|
||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_TOP}/cmake/" "${PROJECT_SOURCE_DIR}/cmake/")
|
||||
|
||||
include(CheckSubmodule)
|
||||
include(GNUInstallDirs)
|
||||
include(CheckCCompilerFlag)
|
||||
include(FeatureSummary)
|
||||
|
|
Loading…
Reference in a new issue