-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
47 lines (34 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
42
43
44
45
46
47
cmake_minimum_required(VERSION 3.19)
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(ProjectName "TestProject" CACHE STRING "")
mark_as_advanced(ProjectName)
message("ProjectName=${ProjectName}")
project(${ProjectName})
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
add_compile_definitions("WIN32_LEAN_AND_MEAN")
add_compile_definitions(APP_NAME="${ProjectName}")
add_compile_definitions(APP_NAMEW=L"${ProjectName}")
add_library(${ProjectName} SHARED)
file(GLOB SOURCES
"include/*.h"
"src/*.h"
"src/*.cpp")
target_sources(${ProjectName} PUBLIC ${SOURCES})
target_precompile_headers(${ProjectName} PRIVATE "src/pch.h")
target_compile_options(${ProjectName} PRIVATE /W4 /WX /ZI)
target_include_directories(${ProjectName} PUBLIC
"include/"
"src/"
)
include(directx)
include(imgui)
include(gwca)
target_link_libraries(${ProjectName} PRIVATE
directx
imgui
gwca)