From 712d6d21c8da9ecdbc6bc74bd1a5d766c0b7cc25 Mon Sep 17 00:00:00 2001 From: Eugeny Kalishenko Date: Wed, 9 Mar 2016 01:06:52 +0300 Subject: [PATCH 1/6] Library splitted into the cpack-components --- BuildSetup.cmake | 31 ++++++++++++++++++- CMakeLists.txt | 8 ++--- core/apps/Rinextools/CMakeLists.txt | 2 +- core/apps/positioning/CMakeLists.txt | 4 +-- core/apps/time/CMakeLists.txt | 2 +- core/tests/CMakeLists.txt | 2 +- ext/apps/Rinextools/CMakeLists.txt | 6 ++-- ext/apps/checktools/CMakeLists.txt | 6 ++-- ext/apps/clocktools/CMakeLists.txt | 26 ++++++++-------- ext/apps/differential/CMakeLists.txt | 2 +- ext/apps/difftools/CMakeLists.txt | 8 ++--- ext/apps/filetools/CMakeLists.txt | 8 ++--- ext/apps/geomatics/JPLeph/CMakeLists.txt | 4 +-- ext/apps/geomatics/cycleslips/CMakeLists.txt | 2 +- ext/apps/geomatics/kalman/CMakeLists.txt | 4 +-- ext/apps/geomatics/relposition/CMakeLists.txt | 2 +- ext/apps/geomatics/robust/CMakeLists.txt | 4 +-- ext/apps/mergetools/CMakeLists.txt | 6 ++-- ext/apps/misc/CMakeLists.txt | 2 +- ext/apps/multipath/CMakeLists.txt | 2 +- ext/apps/positioning/CMakeLists.txt | 2 +- ext/apps/receiver/CMakeLists.txt | 2 +- ext/apps/rfw/CMakeLists.txt | 2 +- ext/apps/swrx/CMakeLists.txt | 2 +- ext/apps/time/CMakeLists.txt | 2 +- .../install-scripts/post_install_script.sh | 1 + .../install-scripts/post_uninstall_script.sh | 1 + 27 files changed, 87 insertions(+), 56 deletions(-) create mode 100644 ref/build/install-scripts/post_install_script.sh create mode 100644 ref/build/install-scripts/post_uninstall_script.sh diff --git a/BuildSetup.cmake b/BuildSetup.cmake index d54c942cb..199e4ba6c 100644 --- a/BuildSetup.cmake +++ b/BuildSetup.cmake @@ -129,11 +129,27 @@ if( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" ) elseif( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" ) set( CPACK_GENERATOR "TGZ" ) elseif( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" ) - set( CPACK_GENERATOR "DEB;TGZ" ) + set( CPACK_GENERATOR "RPM;DEB;TGZ" ) elseif( ${CMAKE_SYSTEM_NAME} MATCHES "Windows" ) set( CPACK_GENERATOR "ZIP" ) endif() +#---------------------------------------- +# Component names for separate distribution in rpms, debs etc. +#---------------------------------------- +set( APPLICATIONS_COMPONENT applications ) +set( LIBRARIES_COMPONENT lib ) +set( DEVEL_COMPONENT devel ) + +set( CPACK_COMPONENT_${APPLICATIONS_COMPONENT}_DISPLAY_NAME "Applications" ) +set( CPACK_COMPONENT_${LIBRARIES_COMPONENT}_DISPLAY_NAME "Libraries" ) +set( CPACK_COMPONENT_${DEVEL_COMPONENT}_DISPLAY_NAME "C++ Headers" ) + +set( CPACK_COMPONENT_${APPLICATIONS_COMPONENT}_DEPENDS ${LIBRARIES_COMPONENT} ) +set( CPACK_COMPONENT_${DEVEL_COMPONENT}_DEPENDS ${LIBRARIES_COMPONENT} ) + +set( CPACK_COMPONENTS_ALL ${APPLICATIONS_COMPONENT} ${LIBRARIES_COMPONENT} ${DEVEL_COMPONENT} ) + set( CPACK_PACKAGE_DESCRIPTION_SUMMARY "GPSTk libraries and applications for GNSS processing.") set( CPACK_PACKAGE_VENDOR "ARL:UT SGL" ) set( CPACK_PACKAGE_CONTACT "Bryan Parsons" ) @@ -144,11 +160,24 @@ set( CPACK_PACKAGE_VERSION_PATCH "${GPSTK_VERSION_PATCH}" ) set( CPACK_INCLUDE_TOPLEVEL_DIRECTORY "OFF" ) set( CPACK_PACKAGE_INSTALL_DIRECTORY "gpstk") set( CPACK_TOPLEVEL_TAG "gpstk" ) +set( CPACK_PACKAGE_RELEASE 1) +set( CPACK_ARCHIVE_COMPONENT_INSTALL ON ) + +set( CPACK_DEB_COMPONENT_INSTALL ON ) set( CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.13)" ) set( CPACK_DEBIAN_SECTION "stable" ) set( CPACK_DEBIAN_PACKAGE_SECTION "science" ) +set( CPACK_RPM_COMPONENT_INSTALL ON ) +set( CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_SOURCE_DIR}/ref/build/install-scripts/post_install_script.sh" ) +set( CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "${CMAKE_SOURCE_DIR}/ref/build/install-scripts/post_uninstall_script.sh" ) +set( CPACK_RPM_PACKAGE_LICENSE LGPL ) +set( CPACK_RPM_PACKAGE_GROUP "Science" ) +set( CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${CPACK_PACKAGING_INSTALL_PREFIX} ) +set( CPACK_RPM_${APPLICATIONS_COMPONENT}_PACKAGE_REQUIRES "${CPACK_PACKAGE_NAME}-${LIBRARIES_COMPONENT} = ${PROJECT_VERSION}-${CPACK_PACKAGE_RELEASE}" ) +set( CPACK_RPM_${DEVEL_COMPONENT}_PACKAGE_REQUIRES "${CPACK_PACKAGE_NAME}-${LIBRARIES_COMPONENT} = ${PROJECT_VERSION}-${CPACK_PACKAGE_RELEASE}" ) + set( CPACK_SOURCE_IGNORE_FILES "${PROJECT_BINARY_DIR}" "/build-.*/" ".*/[.].*" ) set( CPACK_SOURCE_GENERATOR "TGZ") diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f2e1fb52..ecbf145f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -136,10 +136,10 @@ endif() add_library( gpstk ${STADYN} ${GPSTK_SRC_FILES} ${GPSTK_INC_FILES} ) # GPSTk library install target -install( TARGETS gpstk DESTINATION "${CMAKE_INSTALL_LIBDIR}" EXPORT "${EXPORT_TARGETS_FILENAME}" ) +install( TARGETS gpstk DESTINATION "${CMAKE_INSTALL_LIBDIR}" EXPORT "${EXPORT_TARGETS_FILENAME}" COMPONENT ${LIBRARIES_COMPONENT} ) # GPSTk header file install target -install( FILES ${GPSTK_INC_FILES} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ) +install( FILES ${GPSTK_INC_FILES} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT ${DEVEL_COMPONENT} ) #============================================================ # Testing @@ -182,6 +182,6 @@ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/GPSTKConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/GPSTKConfigVersion.cmake DESTINATION - ${INSTALL_CONFIG_DIR} ) + ${INSTALL_CONFIG_DIR} COMPONENT ${DEVEL_COMPONENT} ) -install( EXPORT ${EXPORT_TARGETS_FILENAME} DESTINATION ${INSTALL_CONFIG_DIR} ) +install( EXPORT ${EXPORT_TARGETS_FILENAME} DESTINATION ${INSTALL_CONFIG_DIR} COMPONENT ${DEVEL_COMPONENT} ) diff --git a/core/apps/Rinextools/CMakeLists.txt b/core/apps/Rinextools/CMakeLists.txt index 5ca939236..e7212efb5 100755 --- a/core/apps/Rinextools/CMakeLists.txt +++ b/core/apps/Rinextools/CMakeLists.txt @@ -2,4 +2,4 @@ add_executable(RinDump RinDump.cpp) target_link_libraries(RinDump gpstk) -install (TARGETS RinDump DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS RinDump DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT} ) diff --git a/core/apps/positioning/CMakeLists.txt b/core/apps/positioning/CMakeLists.txt index d4a289d54..5e7ad0a0b 100644 --- a/core/apps/positioning/CMakeLists.txt +++ b/core/apps/positioning/CMakeLists.txt @@ -2,8 +2,8 @@ add_executable(poscvt poscvt.cpp) target_link_libraries(poscvt gpstk) -install (TARGETS poscvt DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS poscvt DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT} ) add_executable(PRSolve PRSolve.cpp) target_link_libraries(PRSolve gpstk) -install (TARGETS PRSolve DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS PRSolve DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT} ) diff --git a/core/apps/time/CMakeLists.txt b/core/apps/time/CMakeLists.txt index f48980ecc..6071e2402 100755 --- a/core/apps/time/CMakeLists.txt +++ b/core/apps/time/CMakeLists.txt @@ -2,6 +2,6 @@ add_executable(timeconvert timeconvert.cpp) target_link_libraries(timeconvert gpstk) -install (TARGETS timeconvert DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS timeconvert DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT} ) diff --git a/core/tests/CMakeLists.txt b/core/tests/CMakeLists.txt index 533cdbb71..b966fbfc7 100644 --- a/core/tests/CMakeLists.txt +++ b/core/tests/CMakeLists.txt @@ -3,7 +3,7 @@ # A program to help app testing add_executable(df_diff df_diff.cpp) target_link_libraries(df_diff gpstk) -install (TARGETS df_diff DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS df_diff DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT} ) add_test(NAME df_diff_1 COMMAND ${CMAKE_COMMAND} diff --git a/ext/apps/Rinextools/CMakeLists.txt b/ext/apps/Rinextools/CMakeLists.txt index 8641acf85..9a7b4ee8d 100755 --- a/ext/apps/Rinextools/CMakeLists.txt +++ b/ext/apps/Rinextools/CMakeLists.txt @@ -2,13 +2,13 @@ add_executable(RinEdit RinEdit.cpp) target_link_libraries(RinEdit gpstk) -install (TARGETS RinEdit DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS RinEdit DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(RinNav RinNav.cpp) target_link_libraries(RinNav gpstk) -install (TARGETS RinNav DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS RinNav DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(RinSum RinSum.cpp msecHandler.cpp) target_link_libraries(RinSum gpstk) -install (TARGETS RinSum DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS RinSum DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) diff --git a/ext/apps/checktools/CMakeLists.txt b/ext/apps/checktools/CMakeLists.txt index e5c46c247..1a6d1a277 100755 --- a/ext/apps/checktools/CMakeLists.txt +++ b/ext/apps/checktools/CMakeLists.txt @@ -2,14 +2,14 @@ add_executable(rowcheck rowcheck.cpp) target_link_libraries(rowcheck gpstk) -install (TARGETS rowcheck DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS rowcheck DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(rmwcheck rmwcheck.cpp) target_link_libraries(rmwcheck gpstk) -install (TARGETS rmwcheck DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS rmwcheck DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(rnwcheck rnwcheck.cpp) target_link_libraries(rnwcheck gpstk) -install (TARGETS rnwcheck DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS rnwcheck DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) diff --git a/ext/apps/clocktools/CMakeLists.txt b/ext/apps/clocktools/CMakeLists.txt index c37303f97..b6c39e7a4 100755 --- a/ext/apps/clocktools/CMakeLists.txt +++ b/ext/apps/clocktools/CMakeLists.txt @@ -2,55 +2,55 @@ add_executable(rmoutlier rmoutlier.cpp) target_link_libraries(rmoutlier gpstk) -install (TARGETS rmoutlier DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS rmoutlier DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(dallandev dallandev.cpp) target_link_libraries(dallandev gpstk) -install (TARGETS dallandev DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS dallandev DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(ffp ffp.cpp) target_link_libraries(ffp gpstk) -install (TARGETS ffp DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS ffp DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(mallandev mallandev.cpp) target_link_libraries(mallandev gpstk) -install (TARGETS mallandev DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS mallandev DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(nallandev nallandev.cpp) target_link_libraries(nallandev gpstk) -install (TARGETS nallandev DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS nallandev DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(oallandev oallandev.cpp) target_link_libraries(oallandev gpstk) -install (TARGETS oallandev DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS oallandev DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(ohadamarddev ohadamarddev.cpp) target_link_libraries(ohadamarddev gpstk) -install (TARGETS ohadamarddev DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS ohadamarddev DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(ORDPhaseParser ORDPhaseParser.cpp) target_link_libraries(ORDPhaseParser gpstk) -install (TARGETS ORDPhaseParser DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS ORDPhaseParser DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(pff pff.cpp) target_link_libraries(pff gpstk) -install (TARGETS pff DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS pff DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(scale scale.cpp) target_link_libraries(scale gpstk) -install (TARGETS scale DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS scale DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(tallandev tallandev.cpp) target_link_libraries(tallandev gpstk) -install (TARGETS tallandev DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS tallandev DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(TIAPhaseParser TIAPhaseParser.cpp) target_link_libraries(TIAPhaseParser gpstk) -install (TARGETS TIAPhaseParser DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS TIAPhaseParser DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(trunc trunc.cpp) target_link_libraries(trunc gpstk) -install (TARGETS trunc DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS trunc DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) install( PROGRAMS allanplot DESTINATION "${CMAKE_INSTALL_BINDIR}" ) install( FILES allanplot.py DESTINATION "${CMAKE_INSTALL_BINDIR}" ) diff --git a/ext/apps/differential/CMakeLists.txt b/ext/apps/differential/CMakeLists.txt index 7ee38458b..af218d6be 100755 --- a/ext/apps/differential/CMakeLists.txt +++ b/ext/apps/differential/CMakeLists.txt @@ -2,4 +2,4 @@ add_executable(vecsol vecsol.cpp) target_link_libraries(vecsol gpstk) -install (TARGETS vecsol DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS vecsol DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) diff --git a/ext/apps/difftools/CMakeLists.txt b/ext/apps/difftools/CMakeLists.txt index 27b9b2233..7fbdba1b9 100755 --- a/ext/apps/difftools/CMakeLists.txt +++ b/ext/apps/difftools/CMakeLists.txt @@ -2,16 +2,16 @@ add_executable(rowdiff rowdiff.cpp) target_link_libraries(rowdiff gpstk) -install (TARGETS rowdiff DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS rowdiff DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(rnwdiff rnwdiff.cpp) target_link_libraries(rnwdiff gpstk) -install (TARGETS rnwdiff DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS rnwdiff DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(rmwdiff rmwdiff.cpp) target_link_libraries(rmwdiff gpstk) -install (TARGETS rmwdiff DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS rmwdiff DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(rinheaddiff rinheaddiff.cpp) target_link_libraries(rinheaddiff gpstk) -install (TARGETS rinheaddiff DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS rinheaddiff DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) diff --git a/ext/apps/filetools/CMakeLists.txt b/ext/apps/filetools/CMakeLists.txt index 0cfba9c04..de045dd8c 100755 --- a/ext/apps/filetools/CMakeLists.txt +++ b/ext/apps/filetools/CMakeLists.txt @@ -2,18 +2,18 @@ add_executable(glodump GloDump.cpp) target_link_libraries(glodump gpstk) -install (TARGETS glodump DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS glodump DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(rinexthin RinexThin.cpp) target_link_libraries(rinexthin gpstk) -install (TARGETS rinexthin DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS rinexthin DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(sp3version sp3version.cpp) target_link_libraries(sp3version gpstk) -install (TARGETS sp3version DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS sp3version DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(bc2sp3 bc2sp3.cpp) target_link_libraries(bc2sp3 gpstk) -install (TARGETS bc2sp3 DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS bc2sp3 DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) diff --git a/ext/apps/geomatics/JPLeph/CMakeLists.txt b/ext/apps/geomatics/JPLeph/CMakeLists.txt index aba04070d..7263fef47 100755 --- a/ext/apps/geomatics/JPLeph/CMakeLists.txt +++ b/ext/apps/geomatics/JPLeph/CMakeLists.txt @@ -2,10 +2,10 @@ add_executable(convertSSEph convertSSEph.cpp) target_link_libraries(convertSSEph gpstk) -install (TARGETS convertSSEph DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS convertSSEph DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(testSSEph testSSEph.cpp) target_link_libraries(testSSEph gpstk) -install (TARGETS testSSEph DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS testSSEph DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) diff --git a/ext/apps/geomatics/cycleslips/CMakeLists.txt b/ext/apps/geomatics/cycleslips/CMakeLists.txt index 42bd896cc..188752e59 100755 --- a/ext/apps/geomatics/cycleslips/CMakeLists.txt +++ b/ext/apps/geomatics/cycleslips/CMakeLists.txt @@ -2,6 +2,6 @@ add_executable(DiscFix DiscFix.cpp) target_link_libraries(DiscFix gpstk) -install (TARGETS DiscFix DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS DiscFix DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) diff --git a/ext/apps/geomatics/kalman/CMakeLists.txt b/ext/apps/geomatics/kalman/CMakeLists.txt index 2f607fb86..49f0c71f2 100755 --- a/ext/apps/geomatics/kalman/CMakeLists.txt +++ b/ext/apps/geomatics/kalman/CMakeLists.txt @@ -2,9 +2,9 @@ add_executable(mergeSRI mergeSRI.cpp) target_link_libraries(mergeSRI gpstk) -install (TARGETS mergeSRI DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS mergeSRI DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(tkalm tkalm.cpp) target_link_libraries(tkalm gpstk) -install (TARGETS tkalm DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS tkalm DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) diff --git a/ext/apps/geomatics/relposition/CMakeLists.txt b/ext/apps/geomatics/relposition/CMakeLists.txt index a44ca0500..923492045 100755 --- a/ext/apps/geomatics/relposition/CMakeLists.txt +++ b/ext/apps/geomatics/relposition/CMakeLists.txt @@ -24,7 +24,7 @@ target_link_libraries(baselib gpstk) add_executable(DDBase DDBase.cpp) target_link_libraries(DDBase baselib) -install (TARGETS DDBase DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS DDBase DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) diff --git a/ext/apps/geomatics/robust/CMakeLists.txt b/ext/apps/geomatics/robust/CMakeLists.txt index 3ea9d92ba..c5e289182 100755 --- a/ext/apps/geomatics/robust/CMakeLists.txt +++ b/ext/apps/geomatics/robust/CMakeLists.txt @@ -2,9 +2,9 @@ add_executable(lsfilt lsfilt.cpp) target_link_libraries(lsfilt gpstk) -install (TARGETS lsfilt DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS lsfilt DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(rstats rstats.cpp) target_link_libraries(rstats gpstk) -install (TARGETS rstats DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS rstats DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) diff --git a/ext/apps/mergetools/CMakeLists.txt b/ext/apps/mergetools/CMakeLists.txt index e8bb182ee..821833b70 100755 --- a/ext/apps/mergetools/CMakeLists.txt +++ b/ext/apps/mergetools/CMakeLists.txt @@ -3,15 +3,15 @@ add_executable(mergeRinObs mergeRinObs.cpp) target_link_libraries(mergeRinObs gpstk) -install (TARGETS mergeRinObs DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS mergeRinObs DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(mergeRinNav mergeRinNav.cpp) target_link_libraries(mergeRinNav gpstk) -install (TARGETS mergeRinNav DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS mergeRinNav DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(mergeRinMet mergeRinMet.cpp) target_link_libraries(mergeRinMet gpstk) -install (TARGETS mergeRinMet DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS mergeRinMet DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) if (CMAKE_SYSTEM_NAME MATCHES "SunOS") target_link_libraries(mergeRinObs gen) diff --git a/ext/apps/misc/CMakeLists.txt b/ext/apps/misc/CMakeLists.txt index fdbd17b39..b23d82fc4 100755 --- a/ext/apps/misc/CMakeLists.txt +++ b/ext/apps/misc/CMakeLists.txt @@ -2,4 +2,4 @@ add_executable(xSVNumXRef xSVNumXRef.cpp) target_link_libraries(xSVNumXRef gpstk) -install (TARGETS xSVNumXRef DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS xSVNumXRef DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) diff --git a/ext/apps/multipath/CMakeLists.txt b/ext/apps/multipath/CMakeLists.txt index fc1d18769..c3e5c503c 100755 --- a/ext/apps/multipath/CMakeLists.txt +++ b/ext/apps/multipath/CMakeLists.txt @@ -3,5 +3,5 @@ add_executable(mpsolve mpsolve.cpp ObsArray.cpp) target_link_libraries(mpsolve gpstk) -install (TARGETS mpsolve DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS mpsolve DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) diff --git a/ext/apps/positioning/CMakeLists.txt b/ext/apps/positioning/CMakeLists.txt index 6d516233b..17672c1da 100755 --- a/ext/apps/positioning/CMakeLists.txt +++ b/ext/apps/positioning/CMakeLists.txt @@ -2,4 +2,4 @@ add_executable(posInterp posInterp.cpp) target_link_libraries(posInterp gpstk) -install (TARGETS posInterp DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS posInterp DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) diff --git a/ext/apps/receiver/CMakeLists.txt b/ext/apps/receiver/CMakeLists.txt index cf4e80898..0553a5cd7 100755 --- a/ext/apps/receiver/CMakeLists.txt +++ b/ext/apps/receiver/CMakeLists.txt @@ -2,5 +2,5 @@ add_executable(rtAshtech AshtechMessage.cpp rtAshtech.cpp ScreenControl.cpp) target_link_libraries(rtAshtech gpstk) -install (TARGETS rtAshtech DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS rtAshtech DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) diff --git a/ext/apps/rfw/CMakeLists.txt b/ext/apps/rfw/CMakeLists.txt index ffc13dd45..801349883 100755 --- a/ext/apps/rfw/CMakeLists.txt +++ b/ext/apps/rfw/CMakeLists.txt @@ -2,7 +2,7 @@ add_executable(rfw rfw.cpp FDStreamBuff.cpp TCPStreamBuff.cpp) target_link_libraries(rfw gpstk) -install (TARGETS rfw DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS rfw DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) if (CMAKE_SYSTEM_NAME MATCHES "SunOS") target_link_libraries(rfw socket nsl) diff --git a/ext/apps/swrx/CMakeLists.txt b/ext/apps/swrx/CMakeLists.txt index 5adabcd34..3972213b0 100644 --- a/ext/apps/swrx/CMakeLists.txt +++ b/ext/apps/swrx/CMakeLists.txt @@ -29,7 +29,7 @@ target_link_libraries(iqdump simlib) add_executable(codeDump codeDump.cpp) target_link_libraries(codeDump simlib) -install (TARGETS codeDump DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS codeDump DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) add_executable(position position.cpp) target_link_libraries(position simlib) diff --git a/ext/apps/time/CMakeLists.txt b/ext/apps/time/CMakeLists.txt index e8a04d7df..17102cc99 100755 --- a/ext/apps/time/CMakeLists.txt +++ b/ext/apps/time/CMakeLists.txt @@ -2,4 +2,4 @@ add_executable(calgps calgps.cpp) target_link_libraries(calgps gpstk) -install (TARGETS calgps DESTINATION "${CMAKE_INSTALL_BINDIR}") +install (TARGETS calgps DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${APPLICATIONS_COMPONENT}) diff --git a/ref/build/install-scripts/post_install_script.sh b/ref/build/install-scripts/post_install_script.sh new file mode 100644 index 000000000..d7f6321a2 --- /dev/null +++ b/ref/build/install-scripts/post_install_script.sh @@ -0,0 +1 @@ +/sbin/ldconfig diff --git a/ref/build/install-scripts/post_uninstall_script.sh b/ref/build/install-scripts/post_uninstall_script.sh new file mode 100644 index 000000000..d7f6321a2 --- /dev/null +++ b/ref/build/install-scripts/post_uninstall_script.sh @@ -0,0 +1 @@ +/sbin/ldconfig From 9f83ffee7a2da242be7712cd01d04110897a789d Mon Sep 17 00:00:00 2001 From: Eugeny Kalishenko Date: Sun, 18 Sep 2016 08:53:27 +0300 Subject: [PATCH 2/6] Added CPACK_PACKAGE_NAME variable for correct dependency resolution --- BuildSetup.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/BuildSetup.cmake b/BuildSetup.cmake index 6ebf22e39..a9c25e937 100644 --- a/BuildSetup.cmake +++ b/BuildSetup.cmake @@ -150,6 +150,7 @@ set( CPACK_COMPONENT_${DEVEL_COMPONENT}_DEPENDS ${LIBRARIES_COMPONENT} ) set( CPACK_COMPONENTS_ALL ${APPLICATIONS_COMPONENT} ${LIBRARIES_COMPONENT} ${DEVEL_COMPONENT} ) +set( CPACK_PACKAGE_NAME ${PROJECT_NAME} ) set( CPACK_PACKAGE_DESCRIPTION_SUMMARY "GPSTk libraries and applications for GNSS processing.") set( CPACK_PACKAGE_VENDOR "ARL:UT SGL" ) set( CPACK_PACKAGE_CONTACT "Bryan Parsons" ) From 9735b05c03939a22f13d6bd23c2ffd79050041cd Mon Sep 17 00:00:00 2001 From: Eugeny Kalishenko Date: Sun, 18 Sep 2016 17:22:42 +0300 Subject: [PATCH 3/6] Fixed PROJECT_VERSION -> GPSTK_VERSION variable name --- BuildSetup.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BuildSetup.cmake b/BuildSetup.cmake index a9c25e937..1bd84d489 100644 --- a/BuildSetup.cmake +++ b/BuildSetup.cmake @@ -176,8 +176,8 @@ set( CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "${CMAKE_SOURCE_DIR}/ref/build/install set( CPACK_RPM_PACKAGE_LICENSE LGPL ) set( CPACK_RPM_PACKAGE_GROUP "Science" ) set( CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${CPACK_PACKAGING_INSTALL_PREFIX} ) -set( CPACK_RPM_${APPLICATIONS_COMPONENT}_PACKAGE_REQUIRES "${CPACK_PACKAGE_NAME}-${LIBRARIES_COMPONENT} = ${PROJECT_VERSION}-${CPACK_PACKAGE_RELEASE}" ) -set( CPACK_RPM_${DEVEL_COMPONENT}_PACKAGE_REQUIRES "${CPACK_PACKAGE_NAME}-${LIBRARIES_COMPONENT} = ${PROJECT_VERSION}-${CPACK_PACKAGE_RELEASE}" ) +set( CPACK_RPM_${APPLICATIONS_COMPONENT}_PACKAGE_REQUIRES "${CPACK_PACKAGE_NAME}-${LIBRARIES_COMPONENT} = ${GPSTK_VERSION}-${CPACK_PACKAGE_RELEASE}" ) +set( CPACK_RPM_${DEVEL_COMPONENT}_PACKAGE_REQUIRES "${CPACK_PACKAGE_NAME}-${LIBRARIES_COMPONENT} = ${GPSTK_VERSION}-${CPACK_PACKAGE_RELEASE}" ) set( CPACK_SOURCE_IGNORE_FILES "${PROJECT_BINARY_DIR}" "/build-.*/" ".*/[.].*" ) set( CPACK_SOURCE_GENERATOR "TGZ") From 995f2c7880c62628fc637c6c8893e022c10bc079 Mon Sep 17 00:00:00 2001 From: Eugeny Kalishenko Date: Sun, 18 Sep 2016 18:06:19 +0300 Subject: [PATCH 4/6] Explicit CPACK name of the project, because rpm package name is generated in lowercase by CPACK, so dependencies should be in lowercase too --- BuildSetup.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BuildSetup.cmake b/BuildSetup.cmake index 1bd84d489..07b3b5a78 100644 --- a/BuildSetup.cmake +++ b/BuildSetup.cmake @@ -150,7 +150,7 @@ set( CPACK_COMPONENT_${DEVEL_COMPONENT}_DEPENDS ${LIBRARIES_COMPONENT} ) set( CPACK_COMPONENTS_ALL ${APPLICATIONS_COMPONENT} ${LIBRARIES_COMPONENT} ${DEVEL_COMPONENT} ) -set( CPACK_PACKAGE_NAME ${PROJECT_NAME} ) +set( CPACK_PACKAGE_NAME "gpstk" ) set( CPACK_PACKAGE_DESCRIPTION_SUMMARY "GPSTk libraries and applications for GNSS processing.") set( CPACK_PACKAGE_VENDOR "ARL:UT SGL" ) set( CPACK_PACKAGE_CONTACT "Bryan Parsons" ) From 1c31599291722db9c171a5fbe4594f566a33c6e9 Mon Sep 17 00:00:00 2001 From: Eugeny Kalishenko Date: Sun, 18 Sep 2016 18:14:05 +0300 Subject: [PATCH 5/6] /usr/share/cmake now excluded from auto addition in order to eliminate conflicts with filesystem (CMake package) --- BuildSetup.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BuildSetup.cmake b/BuildSetup.cmake index 07b3b5a78..34876076d 100644 --- a/BuildSetup.cmake +++ b/BuildSetup.cmake @@ -175,7 +175,7 @@ set( CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_SOURCE_DIR}/ref/build/install-s set( CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "${CMAKE_SOURCE_DIR}/ref/build/install-scripts/post_uninstall_script.sh" ) set( CPACK_RPM_PACKAGE_LICENSE LGPL ) set( CPACK_RPM_PACKAGE_GROUP "Science" ) -set( CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${CPACK_PACKAGING_INSTALL_PREFIX} ) +set( CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION ${CPACK_PACKAGING_INSTALL_PREFIX} "/usr/share/cmake" ) set( CPACK_RPM_${APPLICATIONS_COMPONENT}_PACKAGE_REQUIRES "${CPACK_PACKAGE_NAME}-${LIBRARIES_COMPONENT} = ${GPSTK_VERSION}-${CPACK_PACKAGE_RELEASE}" ) set( CPACK_RPM_${DEVEL_COMPONENT}_PACKAGE_REQUIRES "${CPACK_PACKAGE_NAME}-${LIBRARIES_COMPONENT} = ${GPSTK_VERSION}-${CPACK_PACKAGE_RELEASE}" ) From b860d7bd081dd4fb3f563d0685e2ef6e35bf7f8c Mon Sep 17 00:00:00 2001 From: Eugeny Kalishenko Date: Sun, 18 Sep 2016 18:35:44 +0300 Subject: [PATCH 6/6] Includes installed in "gpstk" directory into standard include OS directory, not in a plain way --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 75023d710..11ff5b93c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -128,7 +128,7 @@ add_library( gpstk ${STADYN} ${GPSTK_SRC_FILES} ${GPSTK_INC_FILES} ) install( TARGETS gpstk DESTINATION "${CMAKE_INSTALL_LIBDIR}" EXPORT "${EXPORT_TARGETS_FILENAME}" COMPONENT ${LIBRARIES_COMPONENT} ) # GPSTk header file install target -install( FILES ${GPSTK_INC_FILES} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT ${DEVEL_COMPONENT} ) +install( FILES ${GPSTK_INC_FILES} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/gpstk" COMPONENT ${DEVEL_COMPONENT} ) #============================================================ # Testing