Permalink
Browse files

step towards individual dev pkgs for each module

  • Loading branch information...
jlblancoc committed Jan 12, 2018
1 parent 228da4d commit 91924ad0f69bdc062561ce6684a178bd7761ecd0
View
@@ -572,13 +572,15 @@ SET( MEX_EXECUTABLE_OUTPUT_PATH ${MRPT_BINARY_DIR}/mex/test CACHE PATH "Output d
IF(CMAKE_MRPT_USE_DEB_POSTFIXS)
# Values when building a Debian package ---------------
MESSAGE(STATUS "** mrpt cmake: Using Debian post-fix for install directories **")
SET(libmrpt_xxx_dev_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/libmrpt-xxx-dev/usr/")
SET(libmrpt_dev_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/libmrpt-dev/usr/")
SET(mrpt_apps_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/mrpt-apps/usr/")
SET(mrpt_doc_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/mrpt-doc/usr/")
SET(mrpt_common_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/mrpt-common/usr/")
SET(mrpt_pkgconfig_INSTALL_PREFIX "/usr") # Values when building a Debian package
ELSE()
# Values under normal conditions -----------------------
SET(libmrpt_xxx_dev_INSTALL_PREFIX "")
SET(libmrpt_dev_INSTALL_PREFIX "")
SET(mrpt_apps_INSTALL_PREFIX "")
SET(mrpt_doc_INSTALL_PREFIX "")
@@ -372,7 +372,22 @@ macro(internal_define_mrpt_lib name headers_only is_metalib)
SET(mrpt_pkgconfig_NO_INSTALL_SOURCE "${MRPT_SOURCE_DIR}")
SET(mrpt_pkgconfig_NO_INSTALL_BINARY "${MRPT_BINARY_DIR}")
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/parse-files/mrpt_template_no_install.pc.in" "${CMAKE_BINARY_DIR}/pkgconfig-no-install/mrpt-${name}.pc" @ONLY)
ENDIF(UNIX)
IF (NOT IS_DEBIAN_DBG_PKG)
STRING(REPLACE "xxx" "${name}" this_lib_dev_INSTALL_PREFIX "${libmrpt_xxx_dev_INSTALL_PREFIX}")
# .pc file:
INSTALL(
FILES "${CMAKE_BINARY_DIR}/pkgconfig/mrpt-${name}.pc"
DESTINATION ${this_lib_dev_INSTALL_PREFIX}${CMAKE_INSTALL_LIBDIR}/pkgconfig)
# Install the headers of all the MRPT libs:
# (in win32 the /libs/* tree is install entirely, not only the headers):
SET(SRC_DIR "${MRPT_SOURCE_DIR}/libs/${name}/include/")
IF (EXISTS "${SRC_DIR}") # This is mainly to avoid problems with "virtual module" names
INSTALL(DIRECTORY "${SRC_DIR}" DESTINATION ${this_lib_dev_INSTALL_PREFIX}include/mrpt/${_LIB}/include/ )
ENDIF()
ENDIF()
ENDIF() # UNIX
IF(MRPT_ENABLE_PRECOMPILED_HDRS AND MSVC)
FOREACH(_N ${${name}_PLUGIN_SRCS_NAME})
@@ -1,13 +1,6 @@
# ----------------------------------------------------------------------------
# More installation commands:
# ----------------------------------------------------------------------------
FILE(GLOB MRPT_PKGCONFIG_PC_FILES "${MRPT_BINARY_DIR}/pkgconfig/mrpt-*.pc")
IF(EXISTS "${MRPT_BINARY_DIR}/pkgconfig/mrpt-core.pc" AND NOT IS_DEBIAN_DBG_PKG)
INSTALL(
FILES ${MRPT_PKGCONFIG_PC_FILES}
DESTINATION ${libmrpt_dev_INSTALL_PREFIX}${CMAKE_INSTALL_LIBDIR}/pkgconfig )
ENDIF()
# CMake will look for MRPTConfig.cmake at: /usr/share|lib/mrpt
IF(WIN32)
@@ -24,15 +17,13 @@ ENDIF()
IF(WIN32)
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/doc" DESTINATION ./ )
IF (PACKAGE_INCLUDES_SOURCES)
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/cmakemodules" DESTINATION ./ )
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/otherlibs" DESTINATION ./ )
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/samples" DESTINATION ./
COMPONENT Examples
PATTERN ".gitignore" EXCLUDE)
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/scripts" DESTINATION ./ )
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/tests" DESTINATION ./ )
ENDIF (PACKAGE_INCLUDES_SOURCES)
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/cmakemodules" DESTINATION ./ )
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/otherlibs" DESTINATION ./ )
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/samples" DESTINATION ./
COMPONENT Examples
PATTERN ".gitignore" EXCLUDE)
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/scripts" DESTINATION ./ )
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/tests" DESTINATION ./ )
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/parse-files" DESTINATION ./ )
INSTALL(DIRECTORY "${MRPT_SOURCE_DIR}/share"
@@ -118,46 +109,26 @@ ELSE(WIN32)
ENDIF(NOT IS_DEBIAN_DBG_PKG)
ENDIF(WIN32)
# The headers of all the MRPT libs:
# (in win32 the /libs/* tree is install entirely, not only the headers):
IF (PACKAGE_INCLUDES_SOURCES)
IF (UNIX AND NOT IS_DEBIAN_DBG_PKG)
FOREACH(_LIB ${ALL_MRPT_LIBS})
STRING(REGEX REPLACE "mrpt-(.*)" "\\1" _LIB ${_LIB})
SET(SRC_DIR "${MRPT_SOURCE_DIR}/libs/${_LIB}/include/")
IF (EXISTS "${SRC_DIR}") # This is mainly to avoid a crash with "mrpt-core", which is a "virtual" MRPT module.
INSTALL(DIRECTORY "${SRC_DIR}" DESTINATION ${libmrpt_dev_INSTALL_PREFIX}include/mrpt/${_LIB}/include/ )
ENDIF (EXISTS "${SRC_DIR}")
ENDFOREACH(_LIB)
ENDIF(UNIX AND NOT IS_DEBIAN_DBG_PKG)
ENDIF (PACKAGE_INCLUDES_SOURCES)
# Config-dependent headers:
IF (PACKAGE_INCLUDES_SOURCES)
IF (NOT IS_DEBIAN_DBG_PKG)
INSTALL(FILES "${MRPT_CONFIG_FILE_INCLUDE_DIR}/mrpt/config.h" DESTINATION "${libmrpt_dev_INSTALL_PREFIX}include/mrpt/mrpt-config/mrpt/" )
INSTALL(FILES "${MRPT_CONFIG_FILE_INCLUDE_DIR}/mrpt/version.h" DESTINATION "${libmrpt_dev_INSTALL_PREFIX}include/mrpt/mrpt-config/mrpt/" )
ENDIF(NOT IS_DEBIAN_DBG_PKG)
ENDIF (PACKAGE_INCLUDES_SOURCES)
IF (NOT IS_DEBIAN_DBG_PKG)
INSTALL(FILES "${MRPT_CONFIG_FILE_INCLUDE_DIR}/mrpt/config.h" DESTINATION "${libmrpt_dev_INSTALL_PREFIX}include/mrpt/mrpt-config/mrpt/" )
INSTALL(FILES "${MRPT_CONFIG_FILE_INCLUDE_DIR}/mrpt/version.h" DESTINATION "${libmrpt_dev_INSTALL_PREFIX}include/mrpt/mrpt-config/mrpt/" )
ENDIF()
# Using embedded version of libraries that need public headers?
IF (PACKAGE_INCLUDES_SOURCES)
IF (EIGEN_USE_EMBEDDED_VERSION AND NOT IS_DEBIAN_DBG_PKG)
IF(WIN32)
# Eigen headers must end up in /Program Files/MRPT-X.Y.Z/libs/base/...
SET(MRPT_INSTALL_EIGEN_PREFIX "libs/base/include/")
ELSE(WIN32)
# Eigen headers must end up in /usr/...
SET(MRPT_INSTALL_EIGEN_PREFIX "${libmrpt_dev_INSTALL_PREFIX}include/mrpt/base/include/")
ENDIF(WIN32)
INSTALL(
DIRECTORY "${MRPT_BINARY_DIR}/otherlibs/eigen3/Eigen"
DESTINATION "${MRPT_INSTALL_EIGEN_PREFIX}" )
INSTALL(
DIRECTORY "${MRPT_BINARY_DIR}/otherlibs/eigen3/unsupported"
DESTINATION "${MRPT_INSTALL_EIGEN_PREFIX}" )
ENDIF (EIGEN_USE_EMBEDDED_VERSION AND NOT IS_DEBIAN_DBG_PKG)
ENDIF (PACKAGE_INCLUDES_SOURCES)
IF (EIGEN_USE_EMBEDDED_VERSION AND NOT IS_DEBIAN_DBG_PKG)
IF(WIN32)
# Eigen headers must end up in /Program Files/MRPT-X.Y.Z/libs/base/...
SET(MRPT_INSTALL_EIGEN_PREFIX "libs/base/include/")
ELSE(WIN32)
# Eigen headers must end up in /usr/...
SET(MRPT_INSTALL_EIGEN_PREFIX "${libmrpt_dev_INSTALL_PREFIX}include/mrpt/base/include/")
ENDIF(WIN32)
INSTALL(
DIRECTORY "${MRPT_BINARY_DIR}/otherlibs/eigen3/Eigen"
DESTINATION "${MRPT_INSTALL_EIGEN_PREFIX}" )
INSTALL(
DIRECTORY "${MRPT_BINARY_DIR}/otherlibs/eigen3/unsupported"
DESTINATION "${MRPT_INSTALL_EIGEN_PREFIX}" )
ENDIF (EIGEN_USE_EMBEDDED_VERSION AND NOT IS_DEBIAN_DBG_PKG)
@@ -26,15 +26,12 @@ SET(CPACK_SOURCE_GENERATOR "TGZ")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "mrpt-${CMAKE_MRPT_VERSION_NUMBER_MAJOR}.${CMAKE_MRPT_VERSION_NUMBER_MINOR}.${CMAKE_MRPT_VERSION_NUMBER_PATCH}" CACHE STRING "Name of the install directory")
MARK_AS_ADVANCED(CPACK_PACKAGE_INSTALL_DIRECTORY)
SET(PACKAGE_INCLUDES_SOURCES ON CACHE BOOL "Include all sources while building packages")
MARK_AS_ADVANCED(PACKAGE_INCLUDES_SOURCES)
IF(WIN32)
# --------------------------------
# Packages for Windows
# --------------------------------
SET(CPACK_SOURCE_IGNORE_FILES ".svn/;.*~;build;CMakeCache.txt;_CPack_Pakages/;CMakeFiles/;install/;Makefile;*.cmake")
# There is a bug in NSI that does not handle full unix paths properly. Make
# sure there is at least one set of four (4) backlasshes.
SET(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/share/pixmaps\\\\mrpt_icon.ico")
@@ -52,19 +49,15 @@ IF(WIN32)
# Install header and source files:
# ---------------------------------------------
IF (PACKAGE_INCLUDES_SOURCES)
INSTALL(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/libs/"
COMPONENT Library_sources
DESTINATION libs
PATTERN ".svn" EXCLUDE
PATTERN "*~" EXCLUDE)
INSTALL(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/apps/"
COMPONENT App_sources
DESTINATION apps
PATTERN ".svn" EXCLUDE
PATTERN "*~" EXCLUDE)
ENDIF (PACKAGE_INCLUDES_SOURCES)
INSTALL(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/libs/"
COMPONENT Library_sources
DESTINATION libs
PATTERN "*~" EXCLUDE)
INSTALL(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/apps/"
COMPONENT App_sources
DESTINATION apps
PATTERN "*~" EXCLUDE)
INSTALL(FILES
AUTHORS
@@ -81,7 +74,7 @@ IF(WIN32)
# Force usage of our custom NSIS template:
SET(CPACK_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/parse-files/")
# File types association:
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
\\\${registerExtension} \\\"$INSTDIR\\\\bin\\\\RawLogViewer.exe\\\" \\\".rawlog\\\" \\\"Robotic Dataset File\\\"
@@ -98,17 +91,17 @@ IF(WIN32)
else(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CPACK_NSIS_PROGRAMFILES PROGRAMFILES)
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
# Allow installing VC redistributables:
SET(INSTALL_MSVC_REDISTRIBUTABLE "" CACHE FILEPATH "Select an optional vcredist*.exe file to include in the installation")
MARK_AS_ADVANCED(INSTALL_MSVC_REDISTRIBUTABLE)
if (NOT "${INSTALL_MSVC_REDISTRIBUTABLE}" STREQUAL "")
if (EXISTS "${INSTALL_MSVC_REDISTRIBUTABLE}")
GET_FILENAME_COMPONENT(INSTALL_MSVC_REDISTRIBUTABLE_FILENAME "${INSTALL_MSVC_REDISTRIBUTABLE}" NAME_WE)
install(PROGRAMS ${INSTALL_MSVC_REDISTRIBUTABLE} DESTINATION tmp)
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}
ExecWait \\\"$INSTDIR\\\\tmp\\\\${INSTALL_MSVC_REDISTRIBUTABLE_FILENAME}\\\"
")
endif (EXISTS "${INSTALL_MSVC_REDISTRIBUTABLE}")
@@ -314,7 +314,7 @@ Description: Mobile Robot Programming Toolkit - maps library
Package: libmrpt-maps-dev
Section: libdevel
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends},libmrpt-maps@MRPT_VER_MM@ (= ${binary:Version})
Depends: ${shlibs:Depends}, ${misc:Depends},libmrpt-maps@MRPT_VER_MM@ (= ${binary:Version}),
liboctomap-dev
Description: Mobile Robot Programming Toolkit - maps development package
This package provides headers and libraries for development.
@@ -330,8 +330,8 @@ Description: Mobile Robot Programming Toolkit - math library
Package: libmrpt-math-dev
Section: libdevel
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends},libmrpt-math@MRPT_VER_MM@ (= ${binary:Version})
libsuitesparse-dev
Depends: ${shlibs:Depends}, ${misc:Depends},libmrpt-math@MRPT_VER_MM@ (= ${binary:Version}),
libsuitesparse-dev, libeigen3-dev
Description: Mobile Robot Programming Toolkit - math development package
This package provides headers and libraries for development.
@@ -571,8 +571,7 @@ Package: libmrpt-dev
Section: libdevel
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends},
libeigen3-dev,
libmrpt-bayes-dev (= ${binary:Version}),
Recommends: libmrpt-bayes-dev (= ${binary:Version}),
libmrpt-comms-dev (= ${binary:Version}),
libmrpt-config-dev (= ${binary:Version}),
libmrpt-containers-dev (= ${binary:Version}),
@@ -315,7 +315,7 @@ Description: Mobile Robot Programming Toolkit - maps library
Package: libmrpt-maps-dev
Section: libdevel
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends},libmrpt-maps@MRPT_VER_MM@ (= ${binary:Version})
Depends: ${shlibs:Depends}, ${misc:Depends},libmrpt-maps@MRPT_VER_MM@ (= ${binary:Version}),
liboctomap-dev
Description: Mobile Robot Programming Toolkit - maps development package
This package provides headers and libraries for development.
@@ -331,8 +331,8 @@ Description: Mobile Robot Programming Toolkit - math library
Package: libmrpt-math-dev
Section: libdevel
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends},libmrpt-math@MRPT_VER_MM@ (= ${binary:Version})
libsuitesparse-dev
Depends: ${shlibs:Depends}, ${misc:Depends},libmrpt-math@MRPT_VER_MM@ (= ${binary:Version}),
libsuitesparse-dev, libeigen3-dev
Description: Mobile Robot Programming Toolkit - math development package
This package provides headers and libraries for development.
@@ -556,8 +556,7 @@ Package: libmrpt-dev
Section: libdevel
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends},
libeigen3-dev,
libmrpt-bayes-dev (= ${binary:Version}),
Recommends: libmrpt-bayes-dev (= ${binary:Version}),
libmrpt-comms-dev (= ${binary:Version}),
libmrpt-config-dev (= ${binary:Version}),
libmrpt-containers-dev (= ${binary:Version}),

0 comments on commit 91924ad

Please sign in to comment.