CMakeLists.txt: properly generate source .tar.gz using cpack

parent 8b2e3897
...@@ -24,11 +24,6 @@ if(NOT CPACK_PACKAGE_NAME) ...@@ -24,11 +24,6 @@ if(NOT CPACK_PACKAGE_NAME)
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}") set(CPACK_PACKAGE_NAME "${PROJECT_NAME}")
endif() endif()
if (NOT CPACK_PACKAGING_INSTALL_PREFIX AND CMAKE_INSTALL_PREFIX)
set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
message("Setting packaging install prefix to ${CPACK_PACKAGING_INSTALL_PREFIX}")
endif()
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Toolbox package used by Belledonne Communications projects") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Toolbox package used by Belledonne Communications projects")
set(CPACK_PACKAGE_VENDOR "Belledonne Communications") set(CPACK_PACKAGE_VENDOR "Belledonne Communications")
set(CPACK_PACKAGE_CONTACT "jehan.monnier@linphone.org") set(CPACK_PACKAGE_CONTACT "jehan.monnier@linphone.org")
...@@ -42,6 +37,10 @@ set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) ...@@ -42,6 +37,10 @@ set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${PROJECT_VERSION}) set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${PROJECT_VERSION})
set(CPACK_SOURCE_GENERATOR "TGZ") set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_SOURCE_IGNORE_FILES
"${CMAKE_BINARY_DIR}"
"^${PROJECT_SOURCE_DIR}/.git*"
)
#set(CPACK_COMPONENTS_ALL runtime devel) #set(CPACK_COMPONENTS_ALL runtime devel)
#set(CPACK_COMPONENT_DEVEL_DEPENDS runtime) #set(CPACK_COMPONENT_DEVEL_DEPENDS runtime)
...@@ -53,4 +52,11 @@ if("${CPACK_GENERATOR}" STREQUAL "RPM") ...@@ -53,4 +52,11 @@ if("${CPACK_GENERATOR}" STREQUAL "RPM")
set (CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig ${CMAKE_INSTALL_FULL_LIBDIR}/cmake) set (CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig ${CMAKE_INSTALL_FULL_LIBDIR}/cmake)
endif() endif()
if("${CPACK_GENERATOR}" STREQUAL "RPM" OR "${CPACK_GENERATOR}" STREQUAL "DEB")
if (NOT CPACK_PACKAGING_INSTALL_PREFIX AND CMAKE_INSTALL_PREFIX)
set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
message("Setting packaging install prefix to ${CPACK_PACKAGING_INSTALL_PREFIX}")
endif()
endif()
include(CPack) include(CPack)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment