generated from SokuDev/ModTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
96 lines (87 loc) · 2.67 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
cmake_minimum_required(VERSION 3.15)
cmake_policy(SET CMP0091 NEW)
set(PROJECT_NAME CharacterEngine)
project("${PROJECT_NAME}" C CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/install")
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
add_definitions(-DWINVER=0x0501 -D_WIN32_WINNT=0x0501)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++11-narrowing -Wno-microsoft-cast")
endif ()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /Brepro")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /Brepro")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /Brepro")
add_compile_definitions(DIRECTINPUT_VERSION=0x0800 CURL_STATICLIB _CRT_SECURE_NO_WARNINGS $<$<CONFIG:Debug>:_DEBUG> _USE_MATH_DEFINES)
include_directories(include)
link_directories(lib)
# SokuLib
add_subdirectory(SokuLib)
# Module
add_library(
"${PROJECT_NAME}"
MODULE
src/CharacterLoader/main.cpp
src/CharacterLoader/version.rc
src/CharacterLoader/cardSave.cpp
src/CharacterLoader/cardSave.hpp
src/CharacterLoader/CharacterModule.cpp
src/CharacterLoader/CharacterModule.hpp
src/CharacterLoader/checkSoku2.cpp
src/CharacterLoader/checkSoku2.hpp
src/CharacterLoader/error.cpp
src/CharacterLoader/error.hpp
src/CharacterLoader/giuroll.cpp
src/CharacterLoader/giuroll.hpp
src/CharacterLoader/scenes.cpp
src/CharacterLoader/scenes.hpp
)
target_compile_options("${PROJECT_NAME}" PRIVATE /Zi)
target_include_directories("${PROJECT_NAME}" PRIVATE include SokuLib/directx "src/Common/")
target_link_libraries(
"${PROJECT_NAME}"
SokuLib
shlwapi
d3d9
d3dx9
)
add_library(
Soku2Loader MODULE
src/Soku2Loader/main.cpp
src/Soku2Loader/version.rc
)
target_compile_options(Soku2Loader PRIVATE /Zi)
target_include_directories(Soku2Loader PRIVATE include SokuLib/directx "src/Common/")
target_link_libraries(
Soku2Loader
SokuLib
shlwapi
)
add_library(
CharacterEngineLibrary STATIC
src/Common/GameObjectList.hpp
src/Common/RotatingBlockingObject.cpp
src/Common/RotatingBlockingObject.hpp
src/Common/BlockingObject.cpp
src/Common/BlockingObject.hpp
src/Common/BasicObject.cpp
src/Common/BasicObject.hpp
src/Common/Memory.cpp
src/Common/Memory.hpp
src/Common/AnglableObject.cpp
src/Common/AnglableObject.hpp
)
target_link_libraries(
CharacterEngineLibrary
SokuLib
)
target_include_directories(
CharacterEngineLibrary PUBLIC
src/Common
)
file(GLOB V_GLOB LIST_DIRECTORIES true "src/Characters/*")
foreach(item ${V_GLOB})
if(IS_DIRECTORY ${item})
add_subdirectory(${item})
endif()
endforeach()