-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
35 lines (27 loc) · 1.35 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
cmake_minimum_required(VERSION 3.27)
project(xsdk-base)
enable_language(ASM_MASM) # Necessary to build AsmTools.asm, written in MASM syntax
add_compile_options(/MP) # Enable multi-threaded compiling
add_compile_options($<IF:$<CONFIG:Debug>,/MTd,/MT>) # Statically linked runtime
add_link_options(/Debug) # Always output debug symbols
add_library(xsdk-base SHARED)
target_compile_features(xsdk-base PUBLIC cxx_std_20)
target_include_directories(xsdk-base PRIVATE src/ imgui/ ${CMAKE_CURRENT_SOURCE_DIR}/)
target_compile_definitions(xsdk-base PRIVATE UNICODE)
add_subdirectory(src)
if(CMAKE_GENERATOR_PLATFORM STREQUAL "Win32")
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "xsdk-base")
else()
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "xsdk-base64")
endif()
set(XSDK_BUILD_EXAMPLES 0 CACHE STRING "Build example modules and tests that can be used in-game.")
# Dependencies
add_subdirectory(minhook)
target_link_libraries(xsdk-base PRIVATE minhook)
# ===== sparkly-fx dependencies =====
add_subdirectory(miniz)
add_subdirectory(json)
target_link_libraries(xsdk-base PRIVATE miniz nlohmann_json::nlohmann_json)
target_include_directories(xsdk-base PRIVATE libspng/spng qoi ffmpipe/include)
target_compile_definitions(xsdk-base PRIVATE SPNG_USE_MINIZ SPNG_STATIC)
target_sources(xsdk-base PRIVATE libspng/spng/spng.c ffmpipe/src/ffmpipe.cpp)