-
-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake: move packaging related stuff from utils.cmake to packaging.cmake
- Loading branch information
1 parent
52c3e2e
commit b0ba60a
Showing
2 changed files
with
33 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,39 @@ | ||
if (UNIX) | ||
if (EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") | ||
set(CPACK_PACKAGE_VENDOR "OpenXRay Team") | ||
set(CPACK_PACKAGE_CONTACT "OpenXRay <[email protected]>") | ||
set(CPACK_PACKAGE_DESCRIPTION ${CMAKE_PROJECT_DESCRIPTION}) | ||
set(CPACK_PACKAGE_VENDOR "OpenXRay Team") | ||
set(CPACK_PACKAGE_CONTACT "OpenXRay <[email protected]>") | ||
set(CPACK_PACKAGE_DESCRIPTION ${CMAKE_PROJECT_DESCRIPTION}) | ||
|
||
set(CPACK_PACKAGE_FILE_NAME "openxray-${CMAKE_PROJECT_VERSION}-${CMAKE_SYSTEM_PROCESSOR}") | ||
|
||
set(CPACK_PACKAGE_FILE_NAME "openxray-${CMAKE_PROJECT_VERSION}-${CMAKE_SYSTEM_PROCESSOR}") | ||
set(CPACK_STRIP_FILES TRUE) | ||
set(CPACK_SOURCE_IGNORE_FILES "/.gitattributes") | ||
set(CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/README.md) | ||
set(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/License.txt) | ||
|
||
set(CPACK_STRIP_FILES TRUE) | ||
set(CPACK_SOURCE_IGNORE_FILES "/.gitattributes") | ||
set(CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/README.md) | ||
set(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/License.txt) | ||
if (UNIX) | ||
# Try to find specific OS files to determine type of linux distribution | ||
find_file(FEDORA_FOUND fedora-release PATHS /etc) | ||
find_file(REDHAT_FOUND redhat-release inittab.RH PATHS /etc) | ||
find_file(CENTOS_FOUND centos-release PATHS /etc) | ||
# If we found debian then we don't need to check further for ubuntu | ||
# as it uses debian core. | ||
find_file(DEBIAN_FOUND debian_version debconf.conf PATHS /etc) | ||
|
||
# -------------------------------------------------- | ||
# Uninstall target | ||
# -------------------------------------------------- | ||
# To clean system folder from libraries and binaries | ||
# that was installed with `sudo make install` | ||
# just run `sudo make uninstall` | ||
if (NOT TARGET uninstall) | ||
configure_file( | ||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" | ||
IMMEDIATE @ONLY) | ||
|
||
add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) | ||
endif() | ||
|
||
if (exists "${CMAKE_ROOT}/Modules/CPack.cmake") | ||
# --- SELECT PROPER CPACK GENERATOR --- | ||
if (DEBIAN_FOUND) | ||
set(CPACK_GENERATOR DEB) | ||
|
@@ -37,12 +60,3 @@ if (UNIX) | |
include(CPack) | ||
endif() | ||
endif() | ||
|
||
# TODO: Need to be implemented in future | ||
if (WIN32) | ||
#set(CPACK_GENERATOR NSIS) | ||
endif() | ||
|
||
if (APPLE) | ||
#set(CPACK_GENERATOR "DRAGNDROP") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters