-
Notifications
You must be signed in to change notification settings - Fork 0
/
nsCMakeConfig.cmake
91 lines (70 loc) · 3.3 KB
/
nsCMakeConfig.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
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
83
84
85
86
87
88
89
90
91
set_property(GLOBAL PROPERTY NS_BUILDTYPENAME_DEBUG "Debug")
set_property(GLOBAL PROPERTY NS_BUILDTYPENAME_DEV "Dev")
set_property(GLOBAL PROPERTY NS_BUILDTYPENAME_RELEASE "Shipping")
set_property(GLOBAL PROPERTY NS_BUILDTYPENAME_DEBUG_UPPER "DEBUG")
set_property(GLOBAL PROPERTY NS_BUILDTYPENAME_DEV_UPPER "DEV")
set_property(GLOBAL PROPERTY NS_BUILDTYPENAME_RELEASE_UPPER "SHIPPING")
set_property(GLOBAL PROPERTY NS_DEV_BUILD_LINKERFLAGS "DEBUG")
set_property(GLOBAL PROPERTY NS_CMAKE_RELPATH "Code/BuildSystem/CMake")
set_property(GLOBAL PROPERTY NS_CMAKE_RELPATH_CODE "Code")
set_property(GLOBAL PROPERTY NS_CONFIG_PATH_7ZA "${CMAKE_SOURCE_DIR}/Data/Tools/Precompiled/7z.exe")
set_property(GLOBAL PROPERTY NS_CONFIG_QT_WINX64_VERSION "Qt6-6.4.0-vs143-x64")
set_property(GLOBAL PROPERTY NS_CONFIG_QT_WINX64_URL "https://github.com/ezEngine/thirdparty/releases/download/Qt6-6.4.0-vs143-x64/Qt6-6.4.0-vs143-x64.7z")
set_property(GLOBAL PROPERTY NS_CONFIG_VULKAN_SDK_LINUXX64_VERSION "1.3.216.0")
set_property(GLOBAL PROPERTY NS_CONFIG_VULKAN_SDK_LINUXX64_URL "https://sdk.lunarg.com/sdk/download/1.3.216.0/linux/vulkansdk-linux-x86_64-1.3.216.0.tar.gz")
function(generate_version_rc out_version_file name type)
set(version_file "${CMAKE_CURRENT_BINARY_DIR}/${name}.version.rc")
set(PRODUCT_VERSION ${PROJECT_VERSION_MAJOR},${PROJECT_VERSION_MINOR},${PROJECT_VERSION_PATCH},0)
set(FILE_VERSION ${PROJECT_VERSION_MAJOR},${PROJECT_VERSION_MINOR},${PROJECT_VERSION_PATCH},0)
set(FILE_FLAGS VS_FF_PRERELEASE)
set(FILE_VERSION_TEXT ${PROJECT_VERSION})
set(PRODUCT_VERSION_TEXT ${PROJECT_VERSION})
# These values come from winver.h, which is included by the config-ed file.
set(FILE_OS VOS__WINDOWS32)
if(NOT type MATCHES "STATIC|SHARED|MODULE|DRIVER|EXECUTABLE")
set(type UNKNOWN)
endif()
set(FILE_TYPE VFT_UNKNOWN)
set(FILE_SUBTYPE 0)
set(extension error)
if(${type} STREQUAL "EXECUTABLE")
if(STC_WINNT)
set(FILE_TYPE VFT_DRV)
set(FILE_SUBTYPE VFT2_DRV_SYSTEM)
set(extension sys)
else()
set(FILE_TYPE VFT_APP)
set(extension exe)
endif()
elseif(${type} STREQUAL "STATIC")
set(FILE_TYPE VFT_STATIC_LIB)
set(extension lib)
elseif(${type} STREQUAL "SHARED" OR ${type} STREQUAL "MODULE")
set(FILE_TYPE VFT_DLL)
set(extension dll)
elseif(${type} STREQUAL "DRIVER")
set(FILE_TYPE VFT_DRV)
set(FILE_SUBTYPE VFT2_DRV_SYSTEM)
set(extension sys)
endif()
set(ORIGINAL_FILENAME ${name}.${extension})
set(COMMENT ${ADDITIONAL_COMMENT})
get_property(FILE_DESCRIPTION DIRECTORY PROPERTY ${name}_FILE_DESCRIPTION)
if(NOT FILE_DESCRIPTION)
set(FILE_DESCRIPTION "${name}")
endif()
if(NOT CMAKE_CONFIGURATION_TYPES)
# Add markup to the description for non-debug mode.
if(NOT CMAKE_BUILD_TYPE MATCHES "Release|MinSizeRel|RelWithDebInfo")
set(build_type ${CMAKE_BUILD_TYPE})
endif()
set(FILE_DESCRIPTION "${FILE_DESCRIPTION} (${ARCHITECTURE}) ${CMAKE_BUILD_TYPE}")
endif()
set(PRODUCT_NAME ${PROJECT})
configure_file(
"${VERSION_RC_TEMPLATE}"
"${version_file}"
@ONLY
)
set(${out_version_file} ${version_file} PARENT_SCOPE)
endfunction()