1 cmake_minimum_required(VERSION 3.2)
5 include(ExternalProject)
7 # enable testing globally
11 # call CMake with -DUSE_CCACHE=ON to make use of it
12 set(USE_CCACHE OFF CACHE BOOL "")
14 find_program(CCACHE ccache)
16 message(STATUS "Using ccache")
17 set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
18 set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
20 message(WARNING "USE_CCACHE set, but could not find ccache")
29 # determine Git commit ID
31 COMMAND git rev-parse --short HEAD
32 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
33 OUTPUT_VARIABLE GIT_COMMIT
34 OUTPUT_STRIP_TRAILING_WHITESPACE
37 # set version and build number
39 mark_as_advanced(VERSION)
40 if("$ENV{TRAVIS_BUILD_NUMBER}" STREQUAL "")
41 set(BUILD_NUMBER "<local dev build>")
43 set(BUILD_NUMBER "$ENV{TRAVIS_BUILD_NUMBER}")
45 mark_as_advanced(BUILD_NUMBER)
49 COMMAND env LC_ALL=C date -u "+%Y-%m-%d %H:%M:%S %Z"
51 OUTPUT_STRIP_TRAILING_WHITESPACE
55 set(CMAKE_C_STANDARD 99)
56 set(CMAKE_CXX_STANDARD 98)
57 set(CMAKE_C_STANDARD_REQUIRED ON)
58 set(CMAKE_CXX_STANDARD_REQUIRED ON)
59 set(CMAKE_POSITION_INDEPENDENT_CODE ON)
62 ##########################
63 # configure dependencies #
64 ##########################
66 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
68 # configure dependencies
71 include(lib/libappimage/cmake/tools.cmake)
72 include(cmake/dependencies.cmake)
80 set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/sanitizers-cmake/cmake" ${CMAKE_MODULE_PATH})
84 ################################
86 ################################
87 set(APPIMAGEKIT_PACKAGE_DEBS FALSE CACHE BOOL "")
89 if(APPIMAGEKIT_PACKAGE_DEBS)
90 include(cmake/cpack_debs.cmake)