-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfig.cmake.in
58 lines (54 loc) · 2.6 KB
/
config.cmake.in
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
@PACKAGE_INIT@
# Support both casing styles
list(APPEND SOURCEMETA_CORE_COMPONENTS ${Core_FIND_COMPONENTS})
list(APPEND SOURCEMETA_CORE_COMPONENTS ${core_FIND_COMPONENTS})
if(NOT SOURCEMETA_CORE_COMPONENTS)
list(APPEND SOURCEMETA_CORE_COMPONENTS regex)
list(APPEND SOURCEMETA_CORE_COMPONENTS uri)
list(APPEND SOURCEMETA_CORE_COMPONENTS json)
list(APPEND SOURCEMETA_CORE_COMPONENTS jsonl)
list(APPEND SOURCEMETA_CORE_COMPONENTS jsonpointer)
list(APPEND SOURCEMETA_CORE_COMPONENTS jsonschema)
list(APPEND SOURCEMETA_CORE_COMPONENTS yaml)
list(APPEND SOURCEMETA_CORE_COMPONENTS alterschema)
endif()
include(CMakeFindDependencyMacro)
foreach(component ${SOURCEMETA_CORE_COMPONENTS})
if(component STREQUAL "regex")
find_dependency(BoostRegex)
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_regex.cmake")
elseif(component STREQUAL "uri")
find_dependency(uriparser)
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_uri.cmake")
elseif(component STREQUAL "json")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_json.cmake")
elseif(component STREQUAL "jsonl")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_json.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_jsonl.cmake")
elseif(component STREQUAL "jsonpointer")
find_dependency(uriparser)
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_uri.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_json.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_jsonpointer.cmake")
elseif(component STREQUAL "jsonschema")
find_dependency(uriparser)
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_uri.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_json.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_jsonpointer.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_jsonschema.cmake")
elseif(component STREQUAL "yaml")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_json.cmake")
find_dependency(yaml)
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_yaml.cmake")
elseif(component STREQUAL "alterschema")
find_dependency(uriparser)
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_uri.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_json.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_jsonpointer.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_jsonschema.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_alterschema.cmake")
else()
message(FATAL_ERROR "Unknown Sourcemeta Core component: ${component}")
endif()
endforeach()
check_required_components("@PROJECT_NAME@")