forked from Nukem9/dlssg-to-fsr3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
78 lines (65 loc) · 1.9 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.26)
project(
dlssg-to-fsr3
VERSION 0.40
LANGUAGES CXX
)
set(PROJECT_DEPENDENCIES_PATH "${CMAKE_CURRENT_LIST_DIR}/dependencies")
set(PROJECT_RESOURCES_PATH "${CMAKE_CURRENT_LIST_DIR}/resources")
set(PROJECT_SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}/source")
#
# Store the current git commit hash for later use
#
execute_process(
COMMAND git log -1 --format=%h
WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}"
OUTPUT_VARIABLE BUILD_GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
#
# Set up the actual library
#
add_subdirectory("${PROJECT_SOURCE_PATH}/maindll")
#
# And finally produce build artifacts
#
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CMAKE_PROJECT_VERSION_MAJOR}.${CMAKE_PROJECT_VERSION_MINOR}")
if(BUILD_OUTPUT_WRAPPER STREQUAL "DLSSTWEAKS")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME} (DLSSTweaks Edition)")
add_subdirectory("${PROJECT_SOURCE_PATH}/wrapper_dt")
install(TARGETS dlsstweaks_wrapper_output_dll RUNTIME DESTINATION "/")
install(
FILES
"${PROJECT_RESOURCES_PATH}/READ ME (DLSSTweaks).txt"
DESTINATION
"/"
)
elseif(BUILD_OUTPUT_WRAPPER STREQUAL "NVNGX")
add_subdirectory("${PROJECT_SOURCE_PATH}/wrapper_nvngx")
install(TARGETS nvngx_wrapper_output_dll RUNTIME DESTINATION "/")
install(
FILES
"${PROJECT_RESOURCES_PATH}/READ ME (Nvngx).txt"
"${PROJECT_RESOURCES_PATH}/DisableNvidiaSignatureChecks.reg"
"${PROJECT_RESOURCES_PATH}/RestoreNvidiaSignatureChecks.reg"
DESTINATION
"/"
)
endif()
install(
FILES
"${PROJECT_RESOURCES_PATH}/binary_dist_license.txt"
DESTINATION
"/"
RENAME
"LICENSE.txt"
)
install(
TARGETS
dlssg_output_dll
RUNTIME
DESTINATION "/"
)
set(CPACK_GENERATOR "ZIP")
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
include(CPack)