Improve CPack deb generation
This commit is contained in:
+21
-5
@@ -5,6 +5,7 @@ include(CMakeDependentOption)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/DAPSS.cmake)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/DebugOpts.cmake)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/VerifyBoostDynamic.cmake)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# Set C++ standard
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
@@ -19,6 +20,13 @@ endif()
|
||||
# Compiler flags
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
|
||||
|
||||
# Ensure installed directories use Debian-standard permissions instead of
|
||||
# inheriting group-writable bits from the build tree.
|
||||
set(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE)
|
||||
|
||||
# Mind oscillator configuration
|
||||
set(MIND_VOSCILLATOR_PERIOD_MS 33 CACHE STRING "Mind's virtual osc clock rate (ms)")
|
||||
if(NOT MIND_VOSCILLATOR_PERIOD_MS GREATER 0)
|
||||
@@ -210,21 +218,29 @@ if(ENABLE_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
install(TARGETS salmanoff DESTINATION bin)
|
||||
install(TARGETS salmanoff DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
# Install device configuration files (preprocessed .daps files)
|
||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/devices/
|
||||
DESTINATION share/salmanoff/devices
|
||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/salmanoff/devices
|
||||
DIRECTORY_PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE
|
||||
FILE_PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE
|
||||
GROUP_READ
|
||||
WORLD_READ
|
||||
FILES_MATCHING PATTERN "*.daps"
|
||||
)
|
||||
|
||||
# Install documentation
|
||||
install(FILES README.md DESTINATION share/doc/salmanoff)
|
||||
install(FILES LICENSE DESTINATION share/doc/salmanoff)
|
||||
install(FILES README.md DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
|
||||
# Install example configurations if they exist
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/examples")
|
||||
install(DIRECTORY examples/ DESTINATION share/salmanoff/examples)
|
||||
install(DIRECTORY examples/ DESTINATION ${CMAKE_INSTALL_DATADIR}/salmanoff/examples)
|
||||
endif()
|
||||
|
||||
# Include CPack configuration
|
||||
|
||||
Reference in New Issue
Block a user