forked from GregLando113/GWCA
-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
41 lines (32 loc) · 1.11 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
cmake_minimum_required(VERSION 3.16)
project(GWCA)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
message(FATAL_ERROR "You are configuring a 64bit build, this is not supported. Run cmake with `-A Win32`")
endif()
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(GWCA_FOLDER "${CMAKE_CURRENT_LIST_DIR}/")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/")
add_subdirectory(Dependencies)
add_library(gwca)
file(GLOB SOURCES
"source/stdafx.h"
"source/*.cpp"
"include/gwca/constants/*.h"
"include/gwca/context/*.h"
"include/gwca/gamecontainers/*.h"
"include/gwca/gameentities/*.h"
"include/gwca/managers/*.h"
"include/gwca/packets/*.h"
"include/gwca/utilities/*.h")
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES ${SOURCES})
target_sources(gwca PRIVATE ${SOURCES})
target_compile_features(gwca PUBLIC cxx_std_17)
target_precompile_headers(gwca PRIVATE "source/stdafx.h")
target_include_directories(gwca PUBLIC "include/")
target_link_libraries(gwca PUBLIC
directx
minhook)
if(${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME})
include(imgui)
add_subdirectory(Examples)
endif()