-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFindCMakeJSON.cmake
More file actions
27 lines (21 loc) · 883 Bytes
/
FindCMakeJSON.cmake
File metadata and controls
27 lines (21 loc) · 883 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
include(FetchContent)
find_file(CMakeJSON_INCLUDE_FILE NAMES "CMakeJSON.cmake" PATHS share cmake share/cmake PATH_SUFFIXES CMakeJSON)
if(NOT CMakeJSON_INCLUDE_FILE AND NOT CMakeJSON_FOUND)
FetchContent_Declare(
CMakeJSON
GIT_REPOSITORY https://github.com/Neumann-A/CMakeJSON.git
GIT_TAG 47737f2f87b5071dcad7b28248583aa2453e0dd5
)
FetchContent_GetProperties(CMakeJSON)
string(TOLOWER "CMakeJSON" lcName)
if(NOT ${lcName}_POPULATED)
FetchContent_Populate(CMakeJSON)
set(CMakeJSON_INCLUDE_FILE "${${lcName}_SOURCE_DIR}/CMakeJSON/CMakeJSON.cmake")
endif()
endif()
if(CMakeJSON_INCLUDE_FILE AND NOT CMakeJSON_FOUND)
include("${CMakeJSON_INCLUDE_FILE}")
set(CMakeJSON_FOUND TRUE)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CMakeJSON FOUND_VAR CMakeJSON_FOUND REQUIRED_VARS CMakeJSON_INCLUDE_FILE)