[openrtm-commit:02805] r212 - in tags/RELEASE_1_1_2/ImageProcessing/opencv: . components/Affine components/Affine/cmake components/BackGroundSubtractionSimple components/BackGroundSubtractionSimple/cmake components/Binarization components/Binarization/cmake components/CameraViewer components/CameraViewer/cmake components/Chromakey components/Chromakey/cmake components/Dilationerosion components/Dilationerosion/cmake components/DirectShowCam components/DirectShowCam/cmake components/Edge components/Edge/cmake components/Findcontour components/Findcontour/cmake components/Flip components/Flip/cmake components/Histogram components/Histogram/cmake components/Houghline components/Houghline/cmake components/ImageCalibration components/ImageCalibration/cmake components/ImageSubstraction components/ImageSubstraction/cmake components/MFCamera components/MFCamera/cmake components/ObjectTracking components/ObjectTracking/cmake components/OpenCVCamera components/OpenCVCamera/cmake components/PGRCamera components/PGRCamera/cmake components/Perspective components/Perspective/cmake components/RockPaperScissors components/RockPaperScissors/cmake components/Rotate components/Rotate/cmake components/Scale components/Scale/cmake components/Sepia components/Sepia/cmake components/SubStractCaptureImage components/SubStractCaptureImage/cmake components/Template components/Template/cmake components/TkCalibGUI components/Translate components/Translate/cmake
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 9月 6日 (水) 13:32:30 JST
Author: kawauchi
Date: 2017-09-06 13:32:30 +0900 (Wed, 06 Sep 2017)
New Revision: 212
Added:
tags/RELEASE_1_1_2/ImageProcessing/opencv/build_linux_package.sh.in
Removed:
tags/RELEASE_1_1_2/ImageProcessing/opencv/build/
tags/RELEASE_1_1_2/ImageProcessing/opencv/build_deb_package.sh
tags/RELEASE_1_1_2/ImageProcessing/opencv/installer/
tags/RELEASE_1_1_2/ImageProcessing/opencv/packages/
tags/RELEASE_1_1_2/ImageProcessing/opencv/rtm/
Modified:
tags/RELEASE_1_1_2/ImageProcessing/opencv/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Affine/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Affine/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/BackGroundSubtractionSimple/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/BackGroundSubtractionSimple/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Binarization/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Binarization/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/CameraViewer/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/CameraViewer/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Chromakey/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Chromakey/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Dilationerosion/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Dilationerosion/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/DirectShowCam/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/DirectShowCam/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Edge/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Edge/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Findcontour/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Findcontour/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Flip/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Flip/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Histogram/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Histogram/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Houghline/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Houghline/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ImageCalibration/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ImageCalibration/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ImageSubstraction/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ImageSubstraction/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/MFCamera/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/MFCamera/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ObjectTracking/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ObjectTracking/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/OpenCVCamera/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/OpenCVCamera/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/PGRCamera/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/PGRCamera/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Perspective/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Perspective/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/RockPaperScissors/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/RockPaperScissors/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Rotate/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Rotate/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Scale/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Scale/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Sepia/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Sepia/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/SubStractCaptureImage/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/SubStractCaptureImage/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Template/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Template/cmake/cpack_options.cmake.in
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/TkCalibGUI/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Translate/CMakeLists.txt
tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Translate/cmake/cpack_options.cmake.in
Log:
[merge] r184,186,188-190 have been merged from trunk.
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -3,3 +3,60 @@
project(ImageProcessing_opencv)
SUBDIRS(components)
set(SolutionDir ${PROJECT_SOURCE_DIR})
+
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+configure_file(${SolutionDir}/build_linux_package.sh.in
+ ${PROJECT_BINARY_DIR}/build_linux_package.sh
+ @ONLY
+)
Deleted: tags/RELEASE_1_1_2/ImageProcessing/opencv/build_deb_package.sh
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/build_deb_package.sh 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/build_deb_package.sh 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-grep -l 'Translate' CPackConfig.cmake | xargs sed -i.bak -e 's/Translate/ImageProcessing/g'
-cpack -C CPackConfig.cmake
Copied: tags/RELEASE_1_1_2/ImageProcessing/opencv/build_linux_package.sh.in (from rev 186, trunk/ImageProcessing/opencv/build_linux_package.sh.in)
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/build_linux_package.sh.in (rev 0)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/build_linux_package.sh.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+GENERATOR=@LINUX_PACKAGE_GENERATOR@
+echo "Linux package generator:" ${GENERATOR}
+
+cpack -C CPackConfig.cmake
+
+if test "x${GENERATOR}" = "xDEB" ;then
+ rename s/translate/imageprocessing/g *.deb
+ newname=`ls *.deb`
+fi
+if test "x${GENERATOR}" = "xRPM" ;then
+ rename Translate ImageProcessing *.rpm
+ newname=`ls *.rpm`
+fi
+
+echo "Rename package : " ${newname}
+
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Affine/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Affine/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Affine/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -11,8 +11,58 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
set(PROJECT_TYPE "c++/opencv-rtcs")
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Affine/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Affine/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Affine/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/BackGroundSubtractionSimple/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/BackGroundSubtractionSimple/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/BackGroundSubtractionSimple/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(BackGroundSubtractionSimple)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/BackGroundSubtractionSimple/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/BackGroundSubtractionSimple/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/BackGroundSubtractionSimple/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Binarization/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Binarization/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Binarization/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(Binarization)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Binarization/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Binarization/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Binarization/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/CameraViewer/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/CameraViewer/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/CameraViewer/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(CameraViewer)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/CameraViewer/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/CameraViewer/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/CameraViewer/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Chromakey/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Chromakey/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Chromakey/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(Chromakey)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Chromakey/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Chromakey/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Chromakey/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Dilationerosion/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Dilationerosion/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Dilationerosion/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(DilationErosion)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Dilationerosion/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Dilationerosion/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Dilationerosion/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/DirectShowCam/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/DirectShowCam/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/DirectShowCam/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(DirectShowCam)
-SUBDIRS(BaseClasses)
-
+SUBDIRS(BaseClasses)
+
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
include("${PROJECT_SOURCE_DIR}/cmake/utils.cmake")
set(PROJECT_VERSION 1.1.0 CACHE STRING "DirectShowCam version")
@@ -13,19 +13,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -45,20 +95,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/DirectShowCam/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/DirectShowCam/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/DirectShowCam/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Edge/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Edge/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Edge/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(Edge)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Edge/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Edge/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Edge/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Findcontour/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Findcontour/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Findcontour/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(Findcontour)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Findcontour/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Findcontour/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Findcontour/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Flip/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Flip/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Flip/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(Flip)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Flip/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Flip/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Flip/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Histogram/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Histogram/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Histogram/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(Histogram)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Histogram/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Histogram/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Histogram/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Houghline/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Houghline/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Houghline/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Houghline/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Houghline/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Houghline/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,98 +1,103 @@
-set(CPACK_PACKAGE_NAME "@PROJECT_NAME@")
-set(CPACK_PACKAGE_VERSION_MAJOR "@PROJECT_VERSION_MAJOR@")
-set(CPACK_PACKAGE_VERSION_MINOR "@PROJECT_VERSION_MINOR@")
-set(CPACK_PACKAGE_VERSION_PATCH "@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
-set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
-set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
-set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
-
-set(CPACK_COMPONENTS_ALL component)
-set(CPACK_COMPONENT_COMPONENT_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_COMPONENT_DESCRIPTION
- "Component library and stand-alone executable")
-if(INSTALL_HEADERS)
- set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} headers)
- set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "Header files")
- set(CPACK_COMPONENT_HEADERS_DESCRIPTION
- "Header files from the component.")
- set(CPACK_COMPONENT_HEADERS_DEPENDS component)
-endif(INSTALL_HEADERS)
-if(INSTALL_IDL)
- set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} idl)
- set(CPACK_COMPONENT_IDL_DISPLAY_NAME "IDL files")
- set(CPACK_COMPONENT_IDL_DESCRIPTION
- "IDL files for the component's services.")
- set(CPACK_COMPONENT_IDL_DEPENDS component)
-endif(INSTALL_IDL)
-set(INSTALL_EXAMPLES @BUILD_EXAMPLES@)
-if(INSTALL_EXAMPLES)
- set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} examples)
- set(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Examples")
- set(CPACK_COMPONENT_EXAMPLES_DESCRIPTION
- "Sample configuration files and other component resources.")
- set(CPACK_COMPONENT_EXAMPLES_DEPENDS component)
-endif(INSTALL_EXAMPLES)
-set(INSTALL_DOCUMENTATION @BUILD_DOCUMENTATION@)
-if(INSTALL_DOCUMENTATION)
- set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} documentation)
- set(CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME "Documentation")
- set(CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION
- "Component documentation")
- set(CPACK_COMPONENT_DOCUMENTATION_DEPENDS component)
-endif(INSTALL_DOCUMENTATION)
-if(INSTALL_SOURCES)
- set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} sources)
- set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
- set(CPACK_COMPONENT_SOURCES_DESCRIPTION
- "Source files from the component.")
-endif(INSTALL_SOURCES)
-
-IF (WIN32)
-
- # Windows WiX package settings
-
- set(CPACK_WIX_XSL "@CMAKE_CURRENT_BINARY_DIR@/wix.xsl")
- set(CPACK_WIX_LANG "ja-jp")
- set(CPACK_RESOURCE_FILE_LICENSE
- "@CMAKE_CURRENT_SOURCE_DIR@/cmake/License.rtf")
- configure_file(
- "@CMAKE_CURRENT_SOURCE_DIR@/cmake/wix.xsl.in"
- "@CMAKE_CURRENT_BINARY_DIR@/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-
-
- #
- #
- #
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
- set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
- set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
- set(CPACK_NSIS_MODIFY_PATH ON)
- set(CPACK_PACKAGE_EXECUTABLES @PROJECT_EXECUTABLES@)
- if(INSTALL_DOCUMENTATION)
- set(CPACK_NSIS_MENU_LINKS
- "@CMAKE_INSTALL_PREFIX@/share/doc/@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@/html/index.html"
- "Component documentation")
- endif(INSTALL_DOCUMENTATION)
- string(REPLACE "/@PROJECT_NAME@" "" install_prefix_root
- "@CMAKE_INSTALL_PREFIX@")
- file(TO_NATIVE_PATH "${install_prefix_root}" install_prefix_root)
- set(CPACK_NSIS_INSTALL_ROOT "${install_prefix_root}")
- set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
- " Rename \"$INSTDIR\\share\\@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@\\@PROJECT_NAME_LOWER at -config.cmake\" \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
- Rename \"$INSTDIR\\share\\@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@\\@PROJECT_NAME_LOWER at -config-version.cmake\" \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
- set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
- " Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
- Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
-ENDIF (WIN32)
-
+set(CPACK_PACKAGE_NAME "@PROJECT_NAME@")
+set(CPACK_PACKAGE_VERSION_MAJOR "@PROJECT_VERSION_MAJOR@")
+set(CPACK_PACKAGE_VERSION_MINOR "@PROJECT_VERSION_MINOR@")
+set(CPACK_PACKAGE_VERSION_PATCH "@PROJECT_VERSION_REVISION@")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
+set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
+set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
+set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
+
+set(CPACK_COMPONENTS_ALL component)
+set(CPACK_COMPONENT_COMPONENT_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_COMPONENT_DESCRIPTION
+ "Component library and stand-alone executable")
+if(INSTALL_HEADERS)
+ set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} headers)
+ set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "Header files")
+ set(CPACK_COMPONENT_HEADERS_DESCRIPTION
+ "Header files from the component.")
+ set(CPACK_COMPONENT_HEADERS_DEPENDS component)
+endif(INSTALL_HEADERS)
+if(INSTALL_IDL)
+ set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} idl)
+ set(CPACK_COMPONENT_IDL_DISPLAY_NAME "IDL files")
+ set(CPACK_COMPONENT_IDL_DESCRIPTION
+ "IDL files for the component's services.")
+ set(CPACK_COMPONENT_IDL_DEPENDS component)
+endif(INSTALL_IDL)
+set(INSTALL_EXAMPLES @BUILD_EXAMPLES@)
+if(INSTALL_EXAMPLES)
+ set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} examples)
+ set(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Examples")
+ set(CPACK_COMPONENT_EXAMPLES_DESCRIPTION
+ "Sample configuration files and other component resources.")
+ set(CPACK_COMPONENT_EXAMPLES_DEPENDS component)
+endif(INSTALL_EXAMPLES)
+set(INSTALL_DOCUMENTATION @BUILD_DOCUMENTATION@)
+if(INSTALL_DOCUMENTATION)
+ set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} documentation)
+ set(CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME "Documentation")
+ set(CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION
+ "Component documentation")
+ set(CPACK_COMPONENT_DOCUMENTATION_DEPENDS component)
+endif(INSTALL_DOCUMENTATION)
+if(INSTALL_SOURCES)
+ set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} sources)
+ set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+ set(CPACK_COMPONENT_SOURCES_DESCRIPTION
+ "Source files from the component.")
+endif(INSTALL_SOURCES)
+
+IF (WIN32)
+
+ # Windows WiX package settings
+
+ set(CPACK_WIX_XSL "@CMAKE_CURRENT_BINARY_DIR@/wix.xsl")
+ set(CPACK_WIX_LANG "ja-jp")
+ set(CPACK_RESOURCE_FILE_LICENSE
+ "@CMAKE_CURRENT_SOURCE_DIR@/cmake/License.rtf")
+ configure_file(
+ "@CMAKE_CURRENT_SOURCE_DIR@/cmake/wix.xsl.in"
+ "@CMAKE_CURRENT_BINARY_DIR@/wix.xsl" @ONLY)
+
+ set(CPACK_PACKAGE_FILE_NAME
+ "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
+
+
+ #
+ #
+ #
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+ set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
+ set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
+ set(CPACK_NSIS_MODIFY_PATH ON)
+ set(CPACK_PACKAGE_EXECUTABLES @PROJECT_EXECUTABLES@)
+ if(INSTALL_DOCUMENTATION)
+ set(CPACK_NSIS_MENU_LINKS
+ "@CMAKE_INSTALL_PREFIX@/share/doc/@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@/html/index.html"
+ "Component documentation")
+ endif(INSTALL_DOCUMENTATION)
+ string(REPLACE "/@PROJECT_NAME@" "" install_prefix_root
+ "@CMAKE_INSTALL_PREFIX@")
+ file(TO_NATIVE_PATH "${install_prefix_root}" install_prefix_root)
+ set(CPACK_NSIS_INSTALL_ROOT "${install_prefix_root}")
+ set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
+ " Rename \"$INSTDIR\\share\\@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@\\@PROJECT_NAME_LOWER at -config.cmake\" \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
+ Rename \"$INSTDIR\\share\\@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@\\@PROJECT_NAME_LOWER at -config-version.cmake\" \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
+ set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
+ " Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
+ Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+ENDIF (WIN32)
+
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ImageCalibration/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ImageCalibration/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ImageCalibration/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -11,8 +11,58 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
set(PROJECT_TYPE "c++/opencv-rtcs")
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ImageCalibration/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ImageCalibration/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ImageCalibration/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,98 +1,103 @@
-set(CPACK_PACKAGE_NAME "@PROJECT_NAME@")
-set(CPACK_PACKAGE_VERSION_MAJOR "@PROJECT_VERSION_MAJOR@")
-set(CPACK_PACKAGE_VERSION_MINOR "@PROJECT_VERSION_MINOR@")
-set(CPACK_PACKAGE_VERSION_PATCH "@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
-set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
-set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
-set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
-
-set(CPACK_COMPONENTS_ALL component)
-set(CPACK_COMPONENT_COMPONENT_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_COMPONENT_DESCRIPTION
- "Component library and stand-alone executable")
-if(INSTALL_HEADERS)
- set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} headers)
- set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "Header files")
- set(CPACK_COMPONENT_HEADERS_DESCRIPTION
- "Header files from the component.")
- set(CPACK_COMPONENT_HEADERS_DEPENDS component)
-endif(INSTALL_HEADERS)
-if(INSTALL_IDL)
- set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} idl)
- set(CPACK_COMPONENT_IDL_DISPLAY_NAME "IDL files")
- set(CPACK_COMPONENT_IDL_DESCRIPTION
- "IDL files for the component's services.")
- set(CPACK_COMPONENT_IDL_DEPENDS component)
-endif(INSTALL_IDL)
-set(INSTALL_EXAMPLES @BUILD_EXAMPLES@)
-if(INSTALL_EXAMPLES)
- set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} examples)
- set(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Examples")
- set(CPACK_COMPONENT_EXAMPLES_DESCRIPTION
- "Sample configuration files and other component resources.")
- set(CPACK_COMPONENT_EXAMPLES_DEPENDS component)
-endif(INSTALL_EXAMPLES)
-set(INSTALL_DOCUMENTATION @BUILD_DOCUMENTATION@)
-if(INSTALL_DOCUMENTATION)
- set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} documentation)
- set(CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME "Documentation")
- set(CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION
- "Component documentation")
- set(CPACK_COMPONENT_DOCUMENTATION_DEPENDS component)
-endif(INSTALL_DOCUMENTATION)
-if(INSTALL_SOURCES)
- set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} sources)
- set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
- set(CPACK_COMPONENT_SOURCES_DESCRIPTION
- "Source files from the component.")
-endif(INSTALL_SOURCES)
-
-IF (WIN32)
-
- # Windows WiX package settings
-
- set(CPACK_WIX_XSL "@CMAKE_CURRENT_BINARY_DIR@/wix.xsl")
- set(CPACK_WIX_LANG "ja-jp")
- set(CPACK_RESOURCE_FILE_LICENSE
- "@CMAKE_CURRENT_SOURCE_DIR@/cmake/License.rtf")
- configure_file(
- "@CMAKE_CURRENT_SOURCE_DIR@/cmake/wix.xsl.in"
- "@CMAKE_CURRENT_BINARY_DIR@/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-
-
- #
- #
- #
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
- set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
- set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
- set(CPACK_NSIS_MODIFY_PATH ON)
- set(CPACK_PACKAGE_EXECUTABLES @PROJECT_EXECUTABLES@)
- if(INSTALL_DOCUMENTATION)
- set(CPACK_NSIS_MENU_LINKS
- "@CMAKE_INSTALL_PREFIX@/share/doc/@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@/html/index.html"
- "Component documentation")
- endif(INSTALL_DOCUMENTATION)
- string(REPLACE "/@PROJECT_NAME@" "" install_prefix_root
- "@CMAKE_INSTALL_PREFIX@")
- file(TO_NATIVE_PATH "${install_prefix_root}" install_prefix_root)
- set(CPACK_NSIS_INSTALL_ROOT "${install_prefix_root}")
- set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
- " Rename \"$INSTDIR\\share\\@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@\\@PROJECT_NAME_LOWER at -config.cmake\" \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
- Rename \"$INSTDIR\\share\\@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@\\@PROJECT_NAME_LOWER at -config-version.cmake\" \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
- set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
- " Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
- Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
-ENDIF (WIN32)
-
+set(CPACK_PACKAGE_NAME "@PROJECT_NAME@")
+set(CPACK_PACKAGE_VERSION_MAJOR "@PROJECT_VERSION_MAJOR@")
+set(CPACK_PACKAGE_VERSION_MINOR "@PROJECT_VERSION_MINOR@")
+set(CPACK_PACKAGE_VERSION_PATCH "@PROJECT_VERSION_REVISION@")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
+set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
+set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
+set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
+
+set(CPACK_COMPONENTS_ALL component)
+set(CPACK_COMPONENT_COMPONENT_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_COMPONENT_DESCRIPTION
+ "Component library and stand-alone executable")
+if(INSTALL_HEADERS)
+ set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} headers)
+ set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "Header files")
+ set(CPACK_COMPONENT_HEADERS_DESCRIPTION
+ "Header files from the component.")
+ set(CPACK_COMPONENT_HEADERS_DEPENDS component)
+endif(INSTALL_HEADERS)
+if(INSTALL_IDL)
+ set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} idl)
+ set(CPACK_COMPONENT_IDL_DISPLAY_NAME "IDL files")
+ set(CPACK_COMPONENT_IDL_DESCRIPTION
+ "IDL files for the component's services.")
+ set(CPACK_COMPONENT_IDL_DEPENDS component)
+endif(INSTALL_IDL)
+set(INSTALL_EXAMPLES @BUILD_EXAMPLES@)
+if(INSTALL_EXAMPLES)
+ set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} examples)
+ set(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Examples")
+ set(CPACK_COMPONENT_EXAMPLES_DESCRIPTION
+ "Sample configuration files and other component resources.")
+ set(CPACK_COMPONENT_EXAMPLES_DEPENDS component)
+endif(INSTALL_EXAMPLES)
+set(INSTALL_DOCUMENTATION @BUILD_DOCUMENTATION@)
+if(INSTALL_DOCUMENTATION)
+ set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} documentation)
+ set(CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME "Documentation")
+ set(CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION
+ "Component documentation")
+ set(CPACK_COMPONENT_DOCUMENTATION_DEPENDS component)
+endif(INSTALL_DOCUMENTATION)
+if(INSTALL_SOURCES)
+ set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} sources)
+ set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+ set(CPACK_COMPONENT_SOURCES_DESCRIPTION
+ "Source files from the component.")
+endif(INSTALL_SOURCES)
+
+IF (WIN32)
+
+ # Windows WiX package settings
+
+ set(CPACK_WIX_XSL "@CMAKE_CURRENT_BINARY_DIR@/wix.xsl")
+ set(CPACK_WIX_LANG "ja-jp")
+ set(CPACK_RESOURCE_FILE_LICENSE
+ "@CMAKE_CURRENT_SOURCE_DIR@/cmake/License.rtf")
+ configure_file(
+ "@CMAKE_CURRENT_SOURCE_DIR@/cmake/wix.xsl.in"
+ "@CMAKE_CURRENT_BINARY_DIR@/wix.xsl" @ONLY)
+
+ set(CPACK_PACKAGE_FILE_NAME
+ "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
+
+
+ #
+ #
+ #
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+ set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
+ set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
+ set(CPACK_NSIS_MODIFY_PATH ON)
+ set(CPACK_PACKAGE_EXECUTABLES @PROJECT_EXECUTABLES@)
+ if(INSTALL_DOCUMENTATION)
+ set(CPACK_NSIS_MENU_LINKS
+ "@CMAKE_INSTALL_PREFIX@/share/doc/@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@/html/index.html"
+ "Component documentation")
+ endif(INSTALL_DOCUMENTATION)
+ string(REPLACE "/@PROJECT_NAME@" "" install_prefix_root
+ "@CMAKE_INSTALL_PREFIX@")
+ file(TO_NATIVE_PATH "${install_prefix_root}" install_prefix_root)
+ set(CPACK_NSIS_INSTALL_ROOT "${install_prefix_root}")
+ set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
+ " Rename \"$INSTDIR\\share\\@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@\\@PROJECT_NAME_LOWER at -config.cmake\" \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
+ Rename \"$INSTDIR\\share\\@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@\\@PROJECT_NAME_LOWER at -config-version.cmake\" \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
+ set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
+ " Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
+ Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+ENDIF (WIN32)
+
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ImageSubstraction/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ImageSubstraction/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ImageSubstraction/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(ImageSubstraction)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ImageSubstraction/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ImageSubstraction/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ImageSubstraction/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/MFCamera/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/MFCamera/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/MFCamera/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(MFCamera)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/MFCamera/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/MFCamera/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/MFCamera/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,98 +1,103 @@
-set(CPACK_PACKAGE_NAME "@PROJECT_NAME@")
-set(CPACK_PACKAGE_VERSION_MAJOR "@PROJECT_VERSION_MAJOR@")
-set(CPACK_PACKAGE_VERSION_MINOR "@PROJECT_VERSION_MINOR@")
-set(CPACK_PACKAGE_VERSION_PATCH "@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
-set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
-set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
-set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
-
-set(CPACK_COMPONENTS_ALL component)
-set(CPACK_COMPONENT_COMPONENT_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_COMPONENT_DESCRIPTION
- "Component library and stand-alone executable")
-if(INSTALL_HEADERS)
- set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} headers)
- set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "Header files")
- set(CPACK_COMPONENT_HEADERS_DESCRIPTION
- "Header files from the component.")
- set(CPACK_COMPONENT_HEADERS_DEPENDS component)
-endif(INSTALL_HEADERS)
-if(INSTALL_IDL)
- set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} idl)
- set(CPACK_COMPONENT_IDL_DISPLAY_NAME "IDL files")
- set(CPACK_COMPONENT_IDL_DESCRIPTION
- "IDL files for the component's services.")
- set(CPACK_COMPONENT_IDL_DEPENDS component)
-endif(INSTALL_IDL)
-set(INSTALL_EXAMPLES @BUILD_EXAMPLES@)
-if(INSTALL_EXAMPLES)
- set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} examples)
- set(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Examples")
- set(CPACK_COMPONENT_EXAMPLES_DESCRIPTION
- "Sample configuration files and other component resources.")
- set(CPACK_COMPONENT_EXAMPLES_DEPENDS component)
-endif(INSTALL_EXAMPLES)
-set(INSTALL_DOCUMENTATION @BUILD_DOCUMENTATION@)
-if(INSTALL_DOCUMENTATION)
- set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} documentation)
- set(CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME "Documentation")
- set(CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION
- "Component documentation")
- set(CPACK_COMPONENT_DOCUMENTATION_DEPENDS component)
-endif(INSTALL_DOCUMENTATION)
-if(INSTALL_SOURCES)
- set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} sources)
- set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
- set(CPACK_COMPONENT_SOURCES_DESCRIPTION
- "Source files from the component.")
-endif(INSTALL_SOURCES)
-
-IF (WIN32)
-
- # Windows WiX package settings
-
- set(CPACK_WIX_XSL "@CMAKE_CURRENT_BINARY_DIR@/wix.xsl")
- set(CPACK_WIX_LANG "ja-jp")
- set(CPACK_RESOURCE_FILE_LICENSE
- "@CMAKE_CURRENT_SOURCE_DIR@/cmake/License.rtf")
- configure_file(
- "@CMAKE_CURRENT_SOURCE_DIR@/cmake/wix.xsl.in"
- "@CMAKE_CURRENT_BINARY_DIR@/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-
-
- #
- #
- #
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
- set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
- set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
- set(CPACK_NSIS_MODIFY_PATH ON)
- set(CPACK_PACKAGE_EXECUTABLES @PROJECT_EXECUTABLES@)
- if(INSTALL_DOCUMENTATION)
- set(CPACK_NSIS_MENU_LINKS
- "@CMAKE_INSTALL_PREFIX@/share/doc/@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@/html/index.html"
- "Component documentation")
- endif(INSTALL_DOCUMENTATION)
- string(REPLACE "/@PROJECT_NAME@" "" install_prefix_root
- "@CMAKE_INSTALL_PREFIX@")
- file(TO_NATIVE_PATH "${install_prefix_root}" install_prefix_root)
- set(CPACK_NSIS_INSTALL_ROOT "${install_prefix_root}")
- set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
- " Rename \"$INSTDIR\\share\\@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@\\@PROJECT_NAME_LOWER at -config.cmake\" \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
- Rename \"$INSTDIR\\share\\@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@\\@PROJECT_NAME_LOWER at -config-version.cmake\" \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
- set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
- " Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
- Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
-ENDIF (WIN32)
-
+set(CPACK_PACKAGE_NAME "@PROJECT_NAME@")
+set(CPACK_PACKAGE_VERSION_MAJOR "@PROJECT_VERSION_MAJOR@")
+set(CPACK_PACKAGE_VERSION_MINOR "@PROJECT_VERSION_MINOR@")
+set(CPACK_PACKAGE_VERSION_PATCH "@PROJECT_VERSION_REVISION@")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
+set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
+set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
+set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
+
+set(CPACK_COMPONENTS_ALL component)
+set(CPACK_COMPONENT_COMPONENT_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_COMPONENT_DESCRIPTION
+ "Component library and stand-alone executable")
+if(INSTALL_HEADERS)
+ set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} headers)
+ set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "Header files")
+ set(CPACK_COMPONENT_HEADERS_DESCRIPTION
+ "Header files from the component.")
+ set(CPACK_COMPONENT_HEADERS_DEPENDS component)
+endif(INSTALL_HEADERS)
+if(INSTALL_IDL)
+ set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} idl)
+ set(CPACK_COMPONENT_IDL_DISPLAY_NAME "IDL files")
+ set(CPACK_COMPONENT_IDL_DESCRIPTION
+ "IDL files for the component's services.")
+ set(CPACK_COMPONENT_IDL_DEPENDS component)
+endif(INSTALL_IDL)
+set(INSTALL_EXAMPLES @BUILD_EXAMPLES@)
+if(INSTALL_EXAMPLES)
+ set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} examples)
+ set(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Examples")
+ set(CPACK_COMPONENT_EXAMPLES_DESCRIPTION
+ "Sample configuration files and other component resources.")
+ set(CPACK_COMPONENT_EXAMPLES_DEPENDS component)
+endif(INSTALL_EXAMPLES)
+set(INSTALL_DOCUMENTATION @BUILD_DOCUMENTATION@)
+if(INSTALL_DOCUMENTATION)
+ set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} documentation)
+ set(CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME "Documentation")
+ set(CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION
+ "Component documentation")
+ set(CPACK_COMPONENT_DOCUMENTATION_DEPENDS component)
+endif(INSTALL_DOCUMENTATION)
+if(INSTALL_SOURCES)
+ set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} sources)
+ set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+ set(CPACK_COMPONENT_SOURCES_DESCRIPTION
+ "Source files from the component.")
+endif(INSTALL_SOURCES)
+
+IF (WIN32)
+
+ # Windows WiX package settings
+
+ set(CPACK_WIX_XSL "@CMAKE_CURRENT_BINARY_DIR@/wix.xsl")
+ set(CPACK_WIX_LANG "ja-jp")
+ set(CPACK_RESOURCE_FILE_LICENSE
+ "@CMAKE_CURRENT_SOURCE_DIR@/cmake/License.rtf")
+ configure_file(
+ "@CMAKE_CURRENT_SOURCE_DIR@/cmake/wix.xsl.in"
+ "@CMAKE_CURRENT_BINARY_DIR@/wix.xsl" @ONLY)
+
+ set(CPACK_PACKAGE_FILE_NAME
+ "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
+
+
+ #
+ #
+ #
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+ set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
+ set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
+ set(CPACK_NSIS_MODIFY_PATH ON)
+ set(CPACK_PACKAGE_EXECUTABLES @PROJECT_EXECUTABLES@)
+ if(INSTALL_DOCUMENTATION)
+ set(CPACK_NSIS_MENU_LINKS
+ "@CMAKE_INSTALL_PREFIX@/share/doc/@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@/html/index.html"
+ "Component documentation")
+ endif(INSTALL_DOCUMENTATION)
+ string(REPLACE "/@PROJECT_NAME@" "" install_prefix_root
+ "@CMAKE_INSTALL_PREFIX@")
+ file(TO_NATIVE_PATH "${install_prefix_root}" install_prefix_root)
+ set(CPACK_NSIS_INSTALL_ROOT "${install_prefix_root}")
+ set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
+ " Rename \"$INSTDIR\\share\\@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@\\@PROJECT_NAME_LOWER at -config.cmake\" \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
+ Rename \"$INSTDIR\\share\\@PROJECT_NAME_LOWER at -@PROJECT_VERSION_MAJOR@\\@PROJECT_NAME_LOWER at -config-version.cmake\" \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
+ set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
+ " Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
+ Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+ENDIF (WIN32)
+
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ObjectTracking/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ObjectTracking/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ObjectTracking/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(ObjectTracking)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ObjectTracking/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ObjectTracking/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/ObjectTracking/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/OpenCVCamera/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/OpenCVCamera/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/OpenCVCamera/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(OpenCVCamera)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/OpenCVCamera/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/OpenCVCamera/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/OpenCVCamera/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/PGRCamera/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/PGRCamera/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/PGRCamera/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(PGRCamera)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/PGRCamera/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/PGRCamera/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/PGRCamera/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Perspective/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Perspective/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Perspective/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(Perspective)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Perspective/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Perspective/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Perspective/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/RockPaperScissors/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/RockPaperScissors/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/RockPaperScissors/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(RockPaperScissors)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/RockPaperScissors/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/RockPaperScissors/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/RockPaperScissors/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Rotate/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Rotate/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Rotate/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(Rotate)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Rotate/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Rotate/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Rotate/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Scale/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Scale/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Scale/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(Scale)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Scale/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Scale/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Scale/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Sepia/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Sepia/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Sepia/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(Sepia)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Sepia/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Sepia/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Sepia/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/SubStractCaptureImage/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/SubStractCaptureImage/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/SubStractCaptureImage/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(SubStractCaptureImage)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/SubStractCaptureImage/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/SubStractCaptureImage/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/SubStractCaptureImage/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Template/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Template/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Template/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(Template)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Template/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Template/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Template/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/TkCalibGUI/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/TkCalibGUI/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/TkCalibGUI/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,10 +5,58 @@
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake_modules")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
# component settings
set(RTC_NAME "${PROJECT_NAME}")
set(RTC_VERSION "1.1.0")
@@ -60,8 +108,8 @@
# set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
# set install path prefix
# set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${RTC_LANG}/${RTC_NAME}")
endif()
@@ -125,6 +173,7 @@
# package settings
set(CPACK_PACKAGE_NAME "${RTC_NAME}")
+string(TOLOWER ${CPACK_PACKAGE_NAME} CPACK_PACKAGE_NAME_LOWER)
set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
@@ -169,37 +218,15 @@
else()
set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
+ if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME_LOWER}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
+ endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_ARCHITECTURE}")
+ endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
- if(CPACK_GENERATOR STREQUAL "DEB")
- # Linux Debian package settings
-
- set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
- set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "i386")
- set(CPACK_DEBIAN_PACKAGE_SECTION "main")
- set(CPACK_DEBIAN_PACKAGE_PRIORITY "extra")
- set(CPACK_DEBIAN_PACKAGE_DEPENDS "openrtm-aist (>= 1.0.0)")
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}_${CPACK_DEBIAN_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
-
- elseif(CPACK_GENERATOR STREQUAL "RPM")
- # Linux RPM package settings
-
- set(CPACK_RPM_PACKAGE_RELEASE "1.fc10")
- set(CPACK_RPM_PACKAGE_ARCHITECTURE "i386")
- set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
- set(CPACK_RPM_PACKAGE_LICENSE "LGPL")
- set(CPACK_RPM_PACKAGE_REQUIRES "OpenRTM-aist >= 1.0.0")
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}-${PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}.${CPACK_RPM_PACKAGE_ARCHITECTURE}")
-
- endif()
endif()
-message(STATUS "Package type: ${CPACK_GENERATOR}")
-message(STATUS "Package name: ${CPACK_PACKAGE_FILE_NAME}")
-
include(CPack)
if (SolutionDir)
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Translate/CMakeLists.txt
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Translate/CMakeLists.txt 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Translate/CMakeLists.txt 2017-09-06 04:32:30 UTC (rev 212)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-cmake_policy(SET CMP0002 OLD)
+cmake_policy(SET CMP0002 OLD)
project(Translate)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
@@ -11,19 +11,69 @@
set(PROJECT_AUTHOR "AIST")
set(PROJECT_AUTHOR_SHORT "AIST")
-set(LINUX_PACKAGE_GENERATOR "DEB")
-#set(LINUX_PACKAGE_GENERATOR "RPM")
-set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
-set(PROJECT_TYPE "c++/opencv-rtcs")
-
+function(get_dist ARG0)
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${ARG0} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE)
+ return()
+ endif()
+ foreach(dist Debian Ubuntu RedHat Fedora CentOS)
+ execute_process(
+ COMMAND grep ${dist} -s /etc/issue /etc/os-release /etc/redhat-release /etc/system-release
+ OUTPUT_VARIABLE dist_name
+ )
+ if(${dist_name} MATCHES ${dist})
+ set(${ARG0} ${dist} PARENT_SCOPE)
+ return()
+ endif()
+ endforeach()
+endfunction(get_dist)
+
+function(get_pkgmgr ARG0)
+ get_dist(DIST_NAME)
+ if(${DIST_NAME} MATCHES "Debian" OR
+ ${DIST_NAME} MATCHES "Ubuntu")
+ set(${ARG0} "DEB" PARENT_SCOPE)
+ return()
+ endif()
+ if(${DIST_NAME} MATCHES "RedHat" OR
+ ${DIST_NAME} MATCHES "Fedora" OR
+ ${DIST_NAME} MATCHES "CentOS")
+ set(${ARG0} "RPM" PARENT_SCOPE)
+ return()
+ endif()
+endfunction(get_pkgmgr)
+
+get_dist(DIST_NAME)
+MESSAGE(STATUS "Distribution is ${DIST_NAME}")
+
+get_pkgmgr(PKGMGR)
+if(PKGMGR AND NOT LINUX_PACKAGE_GENERATOR)
+ set(LINUX_PACKAGE_GENERATOR ${PKGMGR})
+ if(${PKGMGR} MATCHES "DEB")
+ execute_process(COMMAND dpkg --print-architecture
+ OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.")
+ endif()
+ if(${PKGMGR} MATCHES "RPM")
+ execute_process(COMMAND uname "-m"
+ OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Package manager is ${PKGMGR}. Arch is ${CPACK_RPM_PACKAGE_ARCHITECTURE}.")
+ endif()
+endif()
+
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
# Add an "uninstall" target
CONFIGURE_FILE ("${PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
"${PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${PROJECT_NAME}_uninstall "${CMAKE_COMMAND}" -P
"${PROJECT_BINARY_DIR}/uninstall_target.cmake")
#option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" OFF)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
#option(BUILD_TESTS "Build the tests" OFF)
#option(BUILD_TOOLS "Build the tools" OFF)
option(BUILD_IDL "Build and install idl" ON)
@@ -43,20 +93,20 @@
# Set up installation directories
-if(WIN32)
-# set(BIN_INSTALL_DIR "components/bin")
-# set(LIB_INSTALL_DIR "components/lib")
- set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
-else(WIN32)
- set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
- set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
-endif(WIN32)
-
-#set(INC_INSTALL_DIR
-# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
-#set(SHARE_INSTALL_DIR
-# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+if(WIN32)
+# set(BIN_INSTALL_DIR "components/bin")
+# set(LIB_INSTALL_DIR "components/lib")
+ set(INSTALL_PREFIX "components/${PROJECT_TYPE}")
+else(WIN32)
+ set(OPENRTM_SHARE_PREFIX "share/openrtm-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
+ set(INSTALL_PREFIX "${OPENRTM_SHARE_PREFIX}/components/${PROJECT_TYPE}")
+endif(WIN32)
+#set(INC_INSTALL_DIR
+# "components/include/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+#set(SHARE_INSTALL_DIR
+# "components/share/${PROJECT_NAME_LOWER}-${PROJECT_VERSION_MAJOR}")
+
# Get necessary dependency information
find_package(OpenRTM)
if(${OpenRTM_FOUND})
Modified: tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Translate/cmake/cpack_options.cmake.in
===================================================================
--- tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Translate/cmake/cpack_options.cmake.in 2017-09-05 09:22:33 UTC (rev 211)
+++ tags/RELEASE_1_1_2/ImageProcessing/opencv/components/Translate/cmake/cpack_options.cmake.in 2017-09-06 04:32:30 UTC (rev 212)
@@ -5,7 +5,12 @@
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_DESCRIPTION@")
set(CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "@PROJECT_NAME@@PROJECT_VERSION_MAJOR@@PROJECT_VERSION_MINOR@@PROJECT_VERSION_REVISION@")
-set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION@")
+if(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME_LOWER at _@PROJECT_VERSION at _@CPACK_DEBIAN_PACKAGE_ARCHITECTURE@")
+endif(CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME at -@PROJECT_VERSION at -@CPACK_RPM_PACKAGE_ARCHITECTURE@")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
set(CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING.LESSER")
set(CPACK_COMPONENTS_ALL component)
@@ -68,9 +73,9 @@
#
#
#
-# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
-# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
+# set(CPACK_NSIS_MUI_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_NSIS_MUI_UNIICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.ico")
+# set(CPACK_PACKAGE_ICON "@PROJECT_SOURCE_DIR@/cmake\\rt_middleware_logo.bmp")
set(CPACK_NSIS_HELP_LINK "http://www.openrtm.org")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.openrtm.org")
set(CPACK_NSIS_MODIFY_PATH ON)
@@ -90,9 +95,9 @@
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
" Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config.cmake\"
Delete \"$INSTDIR\\@PROJECT_NAME_LOWER at -config-version.cmake\"")
-
-ELSE(WIN32)
- set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
- set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
+
+ELSE(WIN32)
+ set(CPACK_GENERATOR @LINUX_PACKAGE_GENERATOR@)
+ set(CPACK_PACKAGE_CONTACT @PROJECT_MAINTAINER@)
ENDIF (WIN32)
More information about the openrtm-commit
mailing list