forked from AppImageCommunity/libappimage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
50 lines (34 loc) · 1.24 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
cmake_minimum_required(VERSION 3.4)
project(libappimage)
set(V_MAJOR 1)
set(V_MINOR 0)
set(V_PATCH 2)
set(V_SUFFIX "")
set(libappimage_VERSION ${V_MAJOR}.${V_MINOR}.${V_PATCH}${V_SUFFIX})
# more versioning
set(libappimage_SOVERSION ${V_MAJOR}.${V_MINOR})
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Optimize for size in release builds
set(CMAKE_CXX_FLAGS_RELEASE "-Os -DNDEBUG -Wl,--gc-sections")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
include(cmake/reproducible_builds.cmake)
include(cmake/tools.cmake)
include(cmake/dependencies.cmake)
option(LIBAPPIMAGE_DESKTOP_INTEGRATION_ENABLED "Enable desktop integration functions" On)
option(LIBAPPIMAGE_THUMBNAILER_ENABLED "Enable thumbnailer functions" On)
option(LIBAPPIMAGE_STANDALONE "Statically embbed dependencies" Off)
option(ENABLE_COVERAGE "Enable tests code coverate target" Off)
if(ENABLE_COVERAGE)
message("Configuring project for code coverage mesurement")
include(CodeCoverage)
append_coverage_compiler_flags()
endif()
# used by e.g., Debian packaging infrastructure
include(GNUInstallDirs)
add_subdirectory(lib)
add_subdirectory(src)
include(CTest)
add_subdirectory(tests)