-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
62 lines (50 loc) · 1.43 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
cmake_minimum_required(VERSION 3.23)
project(ArcdpsUnofficialExtras CXX)
set(CMAKE_CXX_STANDARD 20)
add_definitions(-DUNICODE)
add_definitions(-D_UNICODE)
find_package(magic_enum CONFIG REQUIRED)
add_library(${PROJECT_NAME} STATIC)
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
target_include_directories(
${PROJECT_NAME}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include/${PROJECT_NAME}>
)
add_compile_definitions(
NOMINMAX
MAGIC_ENUM_RANGE_MAX=256
IMGUI_DEFINE_MATH_OPERATORS
)
target_sources(${PROJECT_NAME} INTERFACE
FILE_SET HEADERS
FILES
Definitions.h
KeyBindHelper.h
KeyBindsTranslation.h
KeyBindStructs.h
)
target_sources(${PROJECT_NAME}
PRIVATE
KeyBindHelper.cpp
KeyBindsTranslation.cpp
)
target_link_libraries(${PROJECT_NAME} PRIVATE magic_enum::magic_enum)
install(TARGETS ${PROJECT_NAME}
EXPORT ArcdpsUnofficialExtrasTargets
FILE_SET HEADERS
DESTINATION include/${PROJECT_NAME}
)
include(CMakePackageConfigHelpers)
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/ArcdpsUnofficialExtrasConfig.cmake
INSTALL_DESTINATION share/${PROJECT_NAME}
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ArcdpsUnofficialExtrasConfig.cmake
DESTINATION share/${PROJECT_NAME}
)
install(EXPORT ArcdpsUnofficialExtrasTargets
FILE ArcdpsUnofficialExtrasTargets.cmake
DESTINATION share/${PROJECT_NAME}
)