forked from HIllya51/LunaHook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
74 lines (58 loc) · 1.63 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
cmake_minimum_required(VERSION 3.16)
project(LunaHook)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(CMAKE_CXX_STANDARD 17)
add_definitions(-DUNICODE -D_UNICODE)
add_compile_options(
/MP
/wd4018
/wd4819
/wd4244
/wd4267
)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
set(bitappendix "64")
else()
set(bitappendix "32")
endif()
if(NOT DEFINED LANGUAGE)
set(LANGUAGE English)
endif()
if(NOT DEFINED BUILD_CORE)
set(BUILD_CORE ON)
endif()
if(NOT DEFINED BUILD_PLUGIN)
set(BUILD_PLUGIN ON)
endif()
if(NOT DEFINED WINXP)
set(WINXPAPP "")
else()
set(WINXPAPP "_winxp")
endif()
add_definitions(-DLANGUAGE=${LANGUAGE})
set(CMAKE_FINAL_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/builds/${CMAKE_BUILD_TYPE}_x${bitappendix}_${LANGUAGE}${WINXPAPP})
set(binary_out_putpath ${CMAKE_SOURCE_DIR}/builds/${CMAKE_BUILD_TYPE}_${LANGUAGE}${WINXPAPP})
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY $<1:${CMAKE_FINAL_OUTPUT_DIRECTORY}>)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY $<1:${binary_out_putpath}>)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${binary_out_putpath}>)
include_directories(.)
include(libs/libs.cmake)
include_directories(include)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/version)
include(generate_product_version)
set(VERSION_MAJOR 5)
set(VERSION_MINOR 0)
set(VERSION_PATCH 0)
set(VERSION_REVISION 0)
if(BUILD_CORE)
add_subdirectory(include)
add_subdirectory(LunaHook)
add_subdirectory(LunaHost)
endif()
if(BUILD_PLUGIN)
add_subdirectory(LunaHost/GUI/Plugin)
endif()