forked from frifox/gw2dps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
98 lines (80 loc) · 2.1 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
97
98
cmake_minimum_required(VERSION 3.2.3)
IF(ARCH_64BIT)
SET(PROJ_NAME gw2dps64)
SET(BOOST_LIBRARYDIR $ENV{BOOST_ROOT}/stage64/lib)
ELSE()
SET(PROJ_NAME gw2dps)
ENDIF()
PROJECT(${PROJ_NAME})
#wxWidget directory
SET(wxWidgets_ROOT_DIR $ENV{WXWIDGET_ROOT})
FIND_PACKAGE(wxWidgets REQUIRED core base)
# boost directory
SET(BOOST_ROOT $ENV{BOOST_ROOT})
SET(Boost_USE_STATIC_LIBS ON)
FIND_PACKAGE(Boost 1.59.0 REQUIRED system thread date_time timer chrono regex)
# to use unicode and avoid errors
ADD_DEFINITIONS(-DUNICODE -D_UNICODE)
# MFC
# ADD_DEFINITIONS(-D_AFXDLL)
# SET(CMAKE_MFC_FLAG 2)
# gw2dps.dll
ADD_LIBRARY(${PROJ_NAME}_dll SHARED
gw2dps/config.h
gw2dps/config.cpp
gw2dps/keymap.h
gw2dps/keymap.cpp
gw2dps/hotkey.h
gw2dps/hotkey.cpp
gw2dps/preferences.h
gw2dps/preferences.cpp
gw2dps/gw2dps.h
gw2dps/gw2dps.cpp)
SET_TARGET_PROPERTIES(${PROJ_NAME}_dll PROPERTIES
FOLDER ${PROJ_NAME}_dll
OUTPUT_NAME ${PROJ_NAME})
TARGET_INCLUDE_DIRECTORIES(${PROJ_NAME}_dll PUBLIC
${Boost_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(${PROJ_NAME}_dll
hacklib_gw2
${Boost_LIBRARIES})
# gw2dps.exe
IF(NOT ARCH_64BIT)
ADD_EXECUTABLE(${PROJ_NAME}_exe WIN32
gw2dps/config.h
gw2dps/config.cpp
gw2dps/keymap.h
gw2dps/keymap.cpp
gw2dps/hotkey.h
gw2dps/hotkey.cpp
injector/MainFrame.h
injector/MainFrame.cpp
injector/ChangeKeyFrame.h
injector/ChangeKeyFrame.cpp
injector/MainPane.h
injector/MainPane.cpp
injector/MainApp.h
injector/MainApp.cpp
injector/Inject.h
injector/Inject.cpp
injector/HotKeyChangeButton.h
injector/HotKeyChangeButton.cpp
injector/Icon.rc)
SET_TARGET_PROPERTIES(${PROJ_NAME}_exe PROPERTIES
FOLDER ${PROJ_NAME}_exe
OUTPUT_NAME ${PROJ_NAME})
TARGET_INCLUDE_DIRECTORIES(${PROJ_NAME}_exe PUBLIC
${Boost_INCLUDE_DIR}
${wxWidgets_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(${PROJ_NAME}_exe
${Boost_LIBRARIES}
${wxWidgets_LIBRARIES})
ENDIF()
# proxy64.exe
IF(ARCH_64BIT)
ADD_EXECUTABLE(proxy64 WIN32
proxy64/Main.cpp)
SET_TARGET_PROPERTIES(proxy64 PROPERTIES
FOLDER ${PROJ_NAME}_exe
OUTPUT_NAME proxy64)
ENDIF()