-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgl_study-config.cmake
More file actions
40 lines (30 loc) · 840 Bytes
/
gl_study-config.cmake
File metadata and controls
40 lines (30 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# This config script tries to locate the project either in its source tree
# of from an install location.
#
# Please adjust the list of submodules to search for.
# List of modules
set(MODULE_NAMES
lib_a
)
# Macro to search for a specific module
macro(find_module FILENAME)
if(EXISTS "${FILENAME}")
set(MODULE_FOUND TRUE)
include("${FILENAME}")
endif()
endmacro()
# Macro to search for all modules
macro(find_modules PREFIX)
foreach(module_name ${MODULE_NAMES})
find_module("${CMAKE_CURRENT_LIST_DIR}/${PREFIX}/${module_name}/${module_name}-export.cmake")
endforeach(module_name)
endmacro()
# Try install location
set(MODULE_FOUND FALSE)
find_modules("cmake")
if(MODULE_FOUND)
return()
endif()
# Try common build locations
find_modules("build/cmake")
find_modules("build-debug/cmake")