-
Notifications
You must be signed in to change notification settings - Fork 29
/
portfile.cmake
53 lines (47 loc) · 1.63 KB
/
portfile.cmake
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
# Local-only code
set(SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}")
# Standard vcpkg stuff
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
utils-imgui WITH_UTILS_IMGUI
utils-mem WITH_UTILS_MEM
utils-pipeline-manager-glslang WITH_UTILS_PIPELINE_MANAGER_GLSLANG
utils-pipeline-manager-slang WITH_UTILS_PIPELINE_MANAGER_SLANG
utils-pipeline-manager-spirv-validation WITH_UTILS_PIPELINE_MANAGER_SPIRV_VALIDATION
utils-task-graph WITH_UTILS_TASK_GRAPH
utils-fsr2 WITH_UTILS_FSR2
)
set(DAXA_DEFINES "-DDAXA_INSTALL=true")
if(WITH_UTILS_IMGUI)
list(APPEND DAXA_DEFINES "-DDAXA_ENABLE_UTILS_IMGUI=true")
endif()
if(WITH_UTILS_MEM)
list(APPEND DAXA_DEFINES "-DDAXA_ENABLE_UTILS_MEM=true")
endif()
if(WITH_UTILS_PIPELINE_MANAGER_GLSLANG)
list(APPEND DAXA_DEFINES "-DDAXA_ENABLE_UTILS_PIPELINE_MANAGER_GLSLANG=true")
endif()
if(WITH_UTILS_PIPELINE_MANAGER_SLANG)
list(APPEND DAXA_DEFINES "-DDAXA_ENABLE_UTILS_PIPELINE_MANAGER_SLANG=true")
endif()
if(WITH_UTILS_PIPELINE_MANAGER_SPIRV_VALIDATION)
list(APPEND DAXA_DEFINES "-DDAXA_ENABLE_UTILS_PIPELINE_MANAGER_SPIRV_VALIDATION=true")
endif()
if(WITH_UTILS_TASK_GRAPH)
list(APPEND DAXA_DEFINES "-DDAXA_ENABLE_UTILS_TASK_GRAPH=true")
endif()
if(WITH_UTILS_FSR2)
list(APPEND DAXA_DEFINES "-DDAXA_ENABLE_UTILS_FSR2=true")
endif()
vcpkg_configure_cmake(
SOURCE_PATH "${SOURCE_PATH}"
PREFER_NINJA
OPTIONS ${DAXA_DEFINES}
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/LICENSE"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
RENAME copyright
)