-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
54 lines (47 loc) · 1.78 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
cmake_minimum_required(VERSION 3.15)
# set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "aaa $CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS")
# set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "aaa $CMAKE_SHARED_LIBRARY_LINK_C_FLAGS")
cmake_policy(SET CMP0091 NEW)
set(PROJECT_NAME PracticeExIntl)
project("${PROJECT_NAME}")
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
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")
# SokuLib
# add_subdirectory(SokuLib)
# add_subdirectory(csv-parser)
# Module
add_library(
"${PROJECT_NAME}"
MODULE
src/main.cpp
src/version.rc
detours/src/detours.cpp
detours/src/modules.cpp
detours/src/disasm.cpp
detours/src/image.cpp
detours/src/creatwth.cpp
detours/src/disolx86.cpp
SokuLib/src/VTables.cpp
SokuLib/src/Scenes.cpp
SokuLib/src/BattleMode.cpp
)
target_compile_options("${PROJECT_NAME}" PRIVATE /Zi)
target_compile_definitions("${PROJECT_NAME}" PRIVATE DIRECTINPUT_VERSION=0x0800 CURL_STATICLIB _CRT_SECURE_NO_WARNINGS $<$<CONFIG:Debug>:_DEBUG>)
target_include_directories("${PROJECT_NAME}" PRIVATE include SokuLib/src SokuLib/directx detours/src/ "src/${PROJECT_NAME}/")
target_link_directories("${PROJECT_NAME}" PRIVATE lib)
target_link_libraries(
"${PROJECT_NAME}"
shlwapi
d3d9
d3dx9
psapi
)