1 Star 0 Fork 0

zhangshuai75/AppImageKit

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 2.09 KB
一键复制 编辑 原始数据 按行查看 历史
TheAssassin 提交于 2018-08-23 12:46 . Switch to new libappimage repository
cmake_minimum_required(VERSION 3.2)
project(AppImageKit)
include(ExternalProject)
# enable testing globally
include(CTest)
# support for ccache
# call CMake with -DUSE_CCACHE=ON to make use of it
set(USE_CCACHE OFF CACHE BOOL "")
if(USE_CCACHE)
find_program(CCACHE ccache)
if(CCACHE)
message(STATUS "Using ccache")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
else()
message(WARNING "USE_CCACHE set, but could not find ccache")
endif()
endif()
#####################
# build information #
#####################
# determine Git commit ID
execute_process(
COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# set version and build number
set(VERSION 1-alpha)
mark_as_advanced(VERSION)
if("$ENV{TRAVIS_BUILD_NUMBER}" STREQUAL "")
set(BUILD_NUMBER "<local dev build>")
else()
set(BUILD_NUMBER "$ENV{TRAVIS_BUILD_NUMBER}")
endif()
mark_as_advanced(BUILD_NUMBER)
# get current date
execute_process(
COMMAND env LC_ALL=C date -u "+%Y-%m-%d %H:%M:%S %Z"
OUTPUT_VARIABLE DATE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# C and C++ versions
set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 98)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
##########################
# configure dependencies #
##########################
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
# configure dependencies
add_subdirectory(lib)
include(lib/libappimage/cmake/tools.cmake)
include(cmake/dependencies.cmake)
################
# Source files #
################
# sanitizer support
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/sanitizers-cmake/cmake" ${CMAKE_MODULE_PATH})
add_subdirectory(src)
################################
# packaging #
################################
set(APPIMAGEKIT_PACKAGE_DEBS FALSE CACHE BOOL "")
if(APPIMAGEKIT_PACKAGE_DEBS)
include(cmake/cpack_debs.cmake)
endif()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/zhangshuai75/AppImageKit.git
git@gitee.com:zhangshuai75/AppImageKit.git
zhangshuai75
AppImageKit
AppImageKit
appimagetool/master

搜索帮助