-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
35 lines (28 loc) · 835 Bytes
/
CMakeLists.txt
File metadata and controls
35 lines (28 loc) · 835 Bytes
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
cmake_minimum_required(VERSION 3.24...4.2)
option(LIBTCODPATH_CPACK "Enable CPack" OFF)
option(LIBTCODPATH_TESTS "Build and enable unit tests" OFF)
option(LIBTCODPATH_TOOLS "Build and enable tools" OFF)
option(LIBTCODPATH_INSTALL "Enable install targets." ON)
set(LIBTCODPATH_VERSION 0.1)
project(
libtcod-path
VERSION ${LIBTCODPATH_VERSION}
LANGUAGES C CXX
)
add_subdirectory(src)
if(LIBTCODPATH_TESTS)
add_subdirectory(tests)
endif()
if(LIBTCODPATH_TOOLS)
add_subdirectory(src/visualizer)
endif()
if(LIBTCODPATH_CPACK)
if(WIN32)
set(CPACK_GENERATOR "ZIP")
else()
set(CPACK_GENERATOR "TGZ")
endif()
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
include(CPack)
endif()