Repository navigation
Expand file tree
/
Copy pathconfig.cmake.in
More file actions
82 lines (76 loc) · 3.95 KB
/
Copy pathconfig.cmake.in
File metadata and controls
82 lines (76 loc) · 3.95 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
@PACKAGE_INIT@
# Support both casing styles
list(APPEND BLAZE_COMPONENTS ${Blaze_FIND_COMPONENTS})
list(APPEND BLAZE_COMPONENTS ${blaze_FIND_COMPONENTS})
if(NOT BLAZE_COMPONENTS)
list(APPEND BLAZE_COMPONENTS compiler)
list(APPEND BLAZE_COMPONENTS evaluator)
list(APPEND BLAZE_COMPONENTS output)
list(APPEND BLAZE_COMPONENTS test)
list(APPEND BLAZE_COMPONENTS configuration)
list(APPEND BLAZE_COMPONENTS alterschema)
list(APPEND BLAZE_COMPONENTS codegen)
list(APPEND BLAZE_COMPONENTS canonicalizer)
list(APPEND BLAZE_COMPONENTS convert)
list(APPEND BLAZE_COMPONENTS editor)
list(APPEND BLAZE_COMPONENTS dependencies)
endif()
include(CMakeFindDependencyMacro)
set(BLAZE_CORE_COMPONENTS
unicode punycode idna regex uri uritemplate json
jsonpointer jsonschema jsonld io yaml crypto email ip dns time css
memory)
# This installation ships its own copy of Core, and CMake never searches the
# prefix of the package it is currently resolving, so a consumer that doesn't
# explicitly name our prefix, like on Windows, where the default install
# location nests as `C:/Program Files (x86)/blaze`, finds Blaze but not the
# Core next to it. Qt does the same for its sibling packages in
# `Qt6GuiDependencies.cmake`, while leaving external ones to `find_dependency`.
# We probe for that sibling with a quiet `find_package` rather than with
# `find_dependency`, as the latter returns out of this file the moment it comes
# up empty, which would leave no room to fall back on the ordinary search for
# installations that were built against a Core from somewhere else
find_package(Core QUIET COMPONENTS ${BLAZE_CORE_COMPONENTS}
PATHS "${CMAKE_CURRENT_LIST_DIR}/../core" NO_DEFAULT_PATH)
if(NOT Core_FOUND)
find_dependency(Core COMPONENTS ${BLAZE_CORE_COMPONENTS})
endif()
foreach(component ${BLAZE_COMPONENTS})
if(component STREQUAL "compiler")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_evaluator.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_compiler.cmake")
elseif(component STREQUAL "evaluator")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_evaluator.cmake")
elseif(component STREQUAL "test")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_evaluator.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_compiler.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_test.cmake")
elseif(component STREQUAL "output")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_evaluator.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_output.cmake")
elseif(component STREQUAL "configuration")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_configuration.cmake")
elseif(component STREQUAL "alterschema")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_evaluator.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_compiler.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_output.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_alterschema.cmake")
elseif(component STREQUAL "codegen")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_evaluator.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_compiler.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_output.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_canonicalizer.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_codegen.cmake")
elseif(component STREQUAL "canonicalizer")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_canonicalizer.cmake")
elseif(component STREQUAL "convert")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_convert.cmake")
elseif(component STREQUAL "editor")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_editor.cmake")
elseif(component STREQUAL "dependencies")
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_dependencies.cmake")
else()
message(FATAL_ERROR "Unknown Blaze component: ${component}")
endif()
endforeach()
check_required_components("@PROJECT_NAME@")