-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
61 lines (48 loc) · 1.82 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
cmake_minimum_required(VERSION 3.26)
project(Unnamed-Roguelike LANGUAGES CXX VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 20)
# set(CMAKE_CXX_FLAGS "-Wall -Wextra -static-libstdc++ -static-libgcc")
# set(CMAKE_CXX_FLAGS "-fsanitize=address -fsanitize=undefined -Wall -Wextra")
# set(CMAKE_CXX_FLAGS "-fsanitize=address -fsanitize=undefined")
# set(CMAKE_CXX_FLAGS "-fsanitize=thread")
# set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_FLAGS "-O3")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
# set(CMAKE_EXE_LINKER_FLAGS "-static")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# FTXUI Includes ---------------------------------------------------------------
include(FetchContent)
FetchContent_Declare(ftxui
GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui
GIT_TAG v4.1.1
)
FetchContent_GetProperties(ftxui)
if(NOT ftxui_POPULATED)
FetchContent_Populate(ftxui)
add_subdirectory(${ftxui_SOURCE_DIR} ${ftxui_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()
# ------------------------------------------------------------------------------
include(CTest)
enable_testing()
# set(GAMEHEADERS src/game)
add_subdirectory(src)
find_library(systems systems)
add_executable(Unnamed-Roguelike main.cpp)
# target_include_directories(Unnamed-Roguelike PRIVATE ${GAMEHEADERS})
# target_link_libraries(Unnamed-Roguelike
# PUBLIC source PUBLIC systems)
target_link_libraries(Unnamed-Roguelike
PRIVATE source
PRIVATE systems
PRIVATE ftxui::screen
PRIVATE ftxui::dom
PRIVATE ftxui::component
)
configure_file(circlemask.mask masks/circlemask.mask)
include(InstallRequiredSystemLibraries)
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Unnamed-Roguelike")
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
set(CPACK_PACKAGE_NAME "Unnamed Roguelike")
install(TARGETS Unnamed-Roguelike RUNTIME DESTINATION bin)
install(TARGETS source DESTINATION include)
include(CPack)