File: CMakeLists.txt

package info (click to toggle)
libappimage 0.1.9+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 3,556 kB
  • sloc: ansic: 3,262; cpp: 1,049; sh: 40; makefile: 9
file content (38 lines) | stat: -rw-r--r-- 1,165 bytes parent folder | download
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
cmake_minimum_required(VERSION 3.4)

project(libappimage)

set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)

# help produce reproducible builds
if(CMAKE_BUILD_TYPE STREQUAL Release)
    message(STATUS "Release build detected, enabling reproducible builds mode")
    get_filename_component(abs_source_path ${PROJECT_SOURCE_DIR} ABSOLUTE)
    file(RELATIVE_PATH rel_source_path ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR})

    set(map_fix ${abs_source_path}=${rel_source_path})

    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdebug-prefix-map=${map_fix} -fmacro-prefix-map=${map_fix}")
    set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -fdebug-prefix-map=${map_fix} -fmacro-prefix-map=${map_fix}")
    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_C_FLAGS} -fdebug-prefix-map=${map_fix} -fmacro-prefix-map=${map_fix}")
endif()

# versioning
set(V_MAJOR 0)
set(V_MINOR 1)
set(V_PATCH 9)

include(cmake/tools.cmake)
include(cmake/dependencies.cmake)

# used by e.g., Debian packaging infrastructure
include(GNUInstallDirs)

add_subdirectory(lib)
add_subdirectory(src)

include(CTest)
add_subdirectory(tests)