This repository has been archived by the owner on Oct 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
69 lines (55 loc) · 1.89 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
# Set the minimum required CMake version
cmake_minimum_required(VERSION 3.28)
# Set up the project
project(ASAApi_example)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Source files organization
set(Header_Files
)
source_group("Header Files" FILES ${Header_Files})
set(Source_Files
)
source_group("Source Files" FILES ${Source_Files})
set(Source_Files__Helpers
)
source_group("Source Files\\Helpers" FILES ${Source_Files__Helpers})
set(Source_Files__Plugin
Plugin/main.cpp
)
source_group("Source Files\\Plugin" FILES ${Source_Files__Plugin})
# Target: Create a shared library
add_library(${PROJECT_NAME} SHARED ${Header_Files}
${Source_Files}
${Source_Files__Helpers}
${Source_Files__Plugin})
# Include directories
target_include_directories(${PROJECT_NAME} PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/ServerAPI/AsaApi/Core/Public;"
"${CMAKE_CURRENT_SOURCE_DIR}/ServerAPI/AsaApi/Core/Public/API;"
"${CMAKE_CURRENT_SOURCE_DIR}/ServerAPI/AsaApi/Core/Public/API/ARK;"
"${CMAKE_CURRENT_SOURCE_DIR}/ServerAPI/AsaApi/Core/Public/API/UE;"
"${CMAKE_CURRENT_SOURCE_DIR}/ServerAPI/AsaApi/Core/Public/Logger;"
"${CMAKE_CURRENT_SOURCE_DIR}/ServerAPI/AsaApi/vcpkg_installed/x64-windows-static-md/x64-windows-static-md/include"
"${CMAKE_CURRENT_SOURCE_DIR}/.;"
"${CMAKE_CURRENT_SOURCE_DIR}/Plugin;"
"${CMAKE_CURRENT_SOURCE_DIR}/Helpers"
)
# Compile definitions
target_compile_definitions(${PROJECT_NAME} PRIVATE
"$<$<CONFIG:Debug>:DEBUG_PLUGIN>"
"NDEBUG;"
"${PROJECT_NAME}_EXPORTS;"
"_WINDOWS;"
"_USRDLL;"
"UNICODE;"
"_UNICODE"
)
# Link directories
target_link_directories(${PROJECT_NAME} PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/libs"
)
# Link libs
target_link_libraries(${PROJECT_NAME} PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/ServerAPI/out_lib/AsaApi.lib"
)