-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
69 lines (45 loc) · 1.77 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
62
63
64
65
66
67
68
set(X_VCPKG_APPLOCAL_DEPS_INSTALL ON)
cmake_minimum_required(VERSION 3.20.0)
project(rtype LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
option(BUILD_TEST_SUITE OFF)
option(ENABLE_CODE_COVERAGE OFF)
#if (COMPILER_TYPE MATCHES "msvc")
# message(STATUS "Using static SFML libraries")
# set(SFML_STATIC_LIBRARIES TRUE)
#endif()
# Add ./cmake to the module path
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
find_package(SFML COMPONENTS graphics window audio system CONFIG REQUIRED)
find_package(Boost REQUIRED COMPONENTS thread)
if(NOT DEFINED CMAKE_SUPPRESS_DEVELOPER_WARNINGS)
set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS 1 CACHE INTERNAL "No dev warnings")
endif()
option(BUILD_TEST_SUITE OFF)
include(CompilerFlags)
include(DetectCompiler)
add_subdirectory(src)
if (BUILD_TEST_SUITE)
enable_testing()
add_subdirectory(tests)
endif()
if (CLIENT_COMPILATION_MODE)
add_compile_definitions(CLIENT_COMPILATION_MODE)
endif()
install(DIRECTORY assets DESTINATION bin)
SET(RTYPE_MAJOR_VERSION 0)
SET(RTYPE_MINOR_VERSION 1)
set(CPACK_WIX_LICENSE_RTF ${PROJECT_SOURCE_DIR}/misc/windows/wix_licence.txt)
message(STATUS "Registering DEB package infos")
set(CPACK_DEBIAN_PACKAGE_NAME "r-thaaaaaai")
set(CPACK_DEBIAN_PACKAGE_VERSION "${RTYPE_MAJOR_VERSION}.${RTYPE_MINOR_VERSION}")
set(CPACK_DEBIAN_PACKAGE_CONTACT "[email protected]")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "TEAM-AAAAAAAAAAAAAAAA")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libsfml-dev, libboost-dev")
set(CPACK_GENERATOR "DEB;RPM;TGZ")
include(InstallRequiredSystemLibraries)
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_VERSION_MAJOR "${RTYPE_MAJOR_VERSION}")
set(CPACK_PACKAGE_VERSION_MINOR "${RTYPE_MINOR_VERSION}")
include(CPack)