-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
38 lines (29 loc) · 1013 Bytes
/
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
cmake_minimum_required(VERSION 3.14)
project(another-day LANGUAGES CXX)
include(FetchContent)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT another-day)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED 20)
set(FETCHCONTENT_QUIET OFF)
set(wxBUILD_SHARED OFF)
FetchContent_Declare(
wxWidgets
GIT_REPOSITORY https://github.com/wxWidgets/wxWidgets.git
GIT_TAG v3.2.6
GIT_PROGRESS TRUE
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(wxWidgets)
file(GLOB_RECURSE SOURCES "src/**.cpp" "src/**.hpp")
set(TARGET "another-day")
add_executable(${TARGET} ${SOURCES})
target_link_libraries(${TARGET} PRIVATE wxcore wxbase)
target_precompile_headers(${TARGET} PRIVATE src/pch.hpp)
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/src FILES ${SOURCES})
if (WIN32)
target_link_options(${TARGET} PRIVATE "/SUBSYSTEM:WINDOWS")
endif()
if (MSVC)
target_compile_options(${TARGET} PRIVATE /MP)
endif()