mirror of
https://github.com/gflags/gflags.git
synced 2025-04-04 13:05:03 +00:00
54 lines
2 KiB
CMake
54 lines
2 KiB
CMake
# Per-generator CPack configuration file. See CPACK_PROJECT_CONFIG_FILE documented at
|
|
# http://www.cmake.org/cmake/help/v2.8.12/cpack.html#variable:CPACK_PROJECT_CONFIG_FILE
|
|
#
|
|
# All common CPACK_* variables are set in CMakeLists.txt already. This file only
|
|
# overrides some of these to provide package generator specific settings.
|
|
|
|
# whether package contains all development files or only runtime files
|
|
set (DEVEL @INSTALL_HEADERS@)
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# Mac OS X package
|
|
if (CPACK_GENERATOR MATCHES "PackageMaker|DragNDrop")
|
|
|
|
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
|
|
if (DEVEL)
|
|
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-devel")
|
|
endif ()
|
|
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${CPACK_PACKAGE_VERSION}")
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# Debian package
|
|
elseif ("^${CPACK_GENERATOR}$" STREQUAL "DEB")
|
|
|
|
set (CPACK_PACKAGE_FILE_NAME "lib${CPACK_PACKAGE_NAME}")
|
|
if (DEVEL)
|
|
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-dev")
|
|
else ()
|
|
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}0")
|
|
endif ()
|
|
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}_${CPACK_PACKAGE_VERSION}-1_${CMAKE_SYSTEM_PROCESSOR}")
|
|
|
|
execute_process (
|
|
COMMAND dpkg --print-architecture
|
|
RESULT_VARIABLE RV
|
|
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
|
|
)
|
|
if (NOT RV EQUAL 0)
|
|
set (CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
|
|
endif ()
|
|
set (CPACK_DEBIAN_PACKAGE_DEPENDS)
|
|
set (CPACK_DEBIAN_PACKAGE_SECTION devel)
|
|
set (CPACK_DEBIAN_PACKAGE_PRIORITY optional)
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# RPM package
|
|
elseif ("^${CPACK_GENERATOR}$" STREQUAL "RPM")
|
|
|
|
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
|
|
if (DEVEL)
|
|
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-devel")
|
|
endif ()
|
|
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${CPACK_PACKAGE_VERSION}-1_${CMAKE_SYSTEM_PROCESSOR}")
|
|
|
|
endif ()
|