-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCMakeLists.txt
53 lines (42 loc) · 1.41 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
cmake_minimum_required(VERSION 3.23)
project(chrgfx VERSION 3.0.2)
set(PROJECT_CONTACT "Damian R ([email protected])")
set(PROJECT_WEBSITE "https://github.com/drojaazu")
set(PROJECT_COPYRIGHT "©2017 Motoi Productions / Released under MIT License")
# Include CCache for compilation caching if available
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
message("using ccache")
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
else()
message("ccache not available")
endif()
# Interprocedural Optimisation if available
include(CheckIPOSupported)
check_ipo_supported(RESULT result OUTPUT output)
if(result)
message("using interprocedural optimisation")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()
enable_language(CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_BUILD_PARALLEL_LEVEL 16)
set(CMAKE_CXX_FLAGS_DEBUG "-g -fstandalone-debug -DDEBUG" CACHE STRING "" FORCE)
include(GNUInstallDirs)
if(NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
endif()
endif()
add_subdirectory(lib/chrgfx)
if(NOT NO_UTILS)
add_subdirectory(app/shared)
add_subdirectory(app/chr2png)
add_subdirectory(app/png2chr)
add_subdirectory(app/palview)
endif()
install(FILES share/gfxdefs
DESTINATION ${CMAKE_INSTALL_DATADIR}/chrgfx)
#set(CMAKE_VERBOSE_MAKEFILE true)