[openrtm-commit:00467] r60 - in trunk/ImageProcessing/opencv/components: . Affine Affine/cmake_modules BackGroundSubtractionSimple BackGroundSubtractionSimple/cmake_modules Binarization Binarization/cmake_modules CameraViewer CameraViewer/cmake_modules Chromakey Chromakey/cmake_modules Dilationerosion Dilationerosion/cmake_modules DirectShowCam DirectShowCam/cmake_modules Edge Edge/cmake_modules Findcontour Findcontour/cmake_modules Flip Flip/cmake_modules Histogram Histogram/cmake_modules Houghline Houghline/cmake_modules ImageCalibration ImageCalibration/cmake_modules ImageSubstraction ImageSubstraction/cmake_modules ObjectTracking ObjectTracking/cmake_modules OpenCVCamera OpenCVCamera/cmake_modules PGRCamera/cmake_modules Perspective Perspective/cmake_modules RockPaperScissors RockPaperScissors/cmake_modules Rotate Rotate/cmake_modules Scale Scale/cmake_modules Sepia Sepia/cmake_modules SubStractCaptureImage SubStractCaptureImage/cmake_modules Template Template/cmake_modules Translate Translate/cmake_modules
openrtm @ openrtm.org
openrtm @ openrtm.org
2011年 10月 27日 (木) 23:42:51 JST
Author: kurihara
Date: 2011-10-27 23:42:50 +0900 (Thu, 27 Oct 2011)
New Revision: 60
Removed:
trunk/ImageProcessing/opencv/components/Affine/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/Affine/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/BackGroundSubtractionSimple/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/BackGroundSubtractionSimple/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/Binarization/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/Binarization/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/CameraViewer/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/CameraViewer/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/Chromakey/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/Chromakey/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/Dilationerosion/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/Dilationerosion/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/DirectShowCam/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/DirectShowCam/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/Edge/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/Edge/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/Findcontour/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/Findcontour/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/Flip/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/Flip/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/Histogram/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/Histogram/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/Houghline/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/Houghline/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/ImageCalibration/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/ImageCalibration/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/ImageSubstraction/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/ImageSubstraction/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/ObjectTracking/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/ObjectTracking/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/OpenCVCamera/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/OpenCVCamera/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/PGRCamera/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/PGRCamera/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/Perspective/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/Perspective/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/RockPaperScissors/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/RockPaperScissors/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/Rotate/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/Rotate/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/Scale/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/Scale/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/Sepia/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/Sepia/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/SubStractCaptureImage/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/SubStractCaptureImage/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/Template/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/Template/cmake_modules/FindOpenRTM.cmake
trunk/ImageProcessing/opencv/components/Translate/cmake_modules/FindOpenCV.cmake
trunk/ImageProcessing/opencv/components/Translate/cmake_modules/FindOpenRTM.cmake
Modified:
trunk/ImageProcessing/opencv/components/Affine/CMakeLists.txt
trunk/ImageProcessing/opencv/components/BackGroundSubtractionSimple/CMakeLists.txt
trunk/ImageProcessing/opencv/components/Binarization/CMakeLists.txt
trunk/ImageProcessing/opencv/components/CMakeLists.txt
trunk/ImageProcessing/opencv/components/CameraViewer/CMakeLists.txt
trunk/ImageProcessing/opencv/components/Chromakey/CMakeLists.txt
trunk/ImageProcessing/opencv/components/Dilationerosion/CMakeLists.txt
trunk/ImageProcessing/opencv/components/DirectShowCam/CMakeLists.txt
trunk/ImageProcessing/opencv/components/Edge/CMakeLists.txt
trunk/ImageProcessing/opencv/components/Findcontour/CMakeLists.txt
trunk/ImageProcessing/opencv/components/Flip/CMakeLists.txt
trunk/ImageProcessing/opencv/components/Histogram/CMakeLists.txt
trunk/ImageProcessing/opencv/components/Houghline/CMakeLists.txt
trunk/ImageProcessing/opencv/components/ImageCalibration/CMakeLists.txt
trunk/ImageProcessing/opencv/components/ImageSubstraction/CMakeLists.txt
trunk/ImageProcessing/opencv/components/ObjectTracking/CMakeLists.txt
trunk/ImageProcessing/opencv/components/OpenCVCamera/CMakeLists.txt
trunk/ImageProcessing/opencv/components/Perspective/CMakeLists.txt
trunk/ImageProcessing/opencv/components/RockPaperScissors/CMakeLists.txt
trunk/ImageProcessing/opencv/components/Rotate/CMakeLists.txt
trunk/ImageProcessing/opencv/components/Scale/CMakeLists.txt
trunk/ImageProcessing/opencv/components/Sepia/CMakeLists.txt
trunk/ImageProcessing/opencv/components/SubStractCaptureImage/CMakeLists.txt
trunk/ImageProcessing/opencv/components/Template/CMakeLists.txt
trunk/ImageProcessing/opencv/components/Translate/CMakeLists.txt
Log:
setting about OpenCV has been modified.
Modified: trunk/ImageProcessing/opencv/components/Affine/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/Affine/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Affine/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,298 +1,218 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(Affine)
-
-#add_executable(AffineComp Affine.cpp Affine.h AffineComp.cpp)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "WiiRemote Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
-)
-
-set(SKEL_SRCS ""
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
-)
-
-set(IMPL_INCS ""
-)
-
-set(LIBS_SRCS Affine.cpp)
-
-set(LIBS_INCS Affine.h)
-
-set(EXEC_SRCS AffineComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- Affine.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS} )
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
-# package settings
-set(CPACK_PACKAGE_NAME "${RTC_NAME}")
-set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
-set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
-set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
-set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
-
-set(CPACK_RESOURCE_FILE_LICENSE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
-set(CPACK_PACKAGE_DESCRIPTION_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
-
-set(CPACK_COMPONENTS_ALL applications documents sources)
-set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
-set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
-
-set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
-set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
-set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
-
-set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
-set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
-set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
-
-if(WIN32)
- set(CPACK_GENERATOR "WIX")
-
- # 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@/cpack_resources/License.rtf")
- configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
- "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
-
-else()
- set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
-
- if(CPACK_GENERATOR STREQUAL "DEB")
- # Linux Debian package settings
-
- set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
- 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)
-
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(Affine)
+
+#add_executable(AffineComp Affine.cpp Affine.h AffineComp.cpp)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "WiiRemote Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+)
+
+set(SKEL_SRCS ""
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+)
+
+set(IMPL_INCS ""
+)
+
+set(LIBS_SRCS Affine.cpp)
+
+set(LIBS_INCS Affine.h)
+
+set(EXEC_SRCS AffineComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ Affine.conf rtc.conf)
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS} )
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "$ENV{OpenCV_DIR}")
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+link_directories(${OpenCV_LIB_DIR})
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIR})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
Deleted: trunk/ImageProcessing/opencv/components/Affine/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Affine/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Affine/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/Affine/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Affine/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Affine/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/BackGroundSubtractionSimple/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/BackGroundSubtractionSimple/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/BackGroundSubtractionSimple/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,299 +1,299 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(BackGroundSubtractionSimple)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "BackGroundSubtractionSimple Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS BackGroundSubtractionSimple.cpp)
-
-set(LIBS_INCS BackGroundSubtractionSimple.h)
-
-set(EXEC_SRCS BackGroundSubtractionSimpleComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- BackGroundSubtractionSimple.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
-# package settings
-set(CPACK_PACKAGE_NAME "${RTC_NAME}")
-set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
-set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
-set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
-set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
-
-set(CPACK_RESOURCE_FILE_LICENSE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
-set(CPACK_PACKAGE_DESCRIPTION_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
-
-set(CPACK_COMPONENTS_ALL applications documents sources)
-set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
-set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
-
-set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
-set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
-set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
-
-set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
-set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
-set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
-
-if(WIN32)
- set(CPACK_GENERATOR "WIX")
-
- # 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@/cpack_resources/License.rtf")
- configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
- "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
-
-else()
- set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
-
- if(CPACK_GENERATOR STREQUAL "DEB")
- # Linux Debian package settings
-
- set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
- 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)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(BackGroundSubtractionSimple)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "BackGroundSubtractionSimple Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS BackGroundSubtractionSimple.cpp)
+
+set(LIBS_INCS BackGroundSubtractionSimple.h)
+
+set(EXEC_SRCS BackGroundSubtractionSimpleComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ BackGroundSubtractionSimple.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
+# package settings
+set(CPACK_PACKAGE_NAME "${RTC_NAME}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
+set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
+
+set(CPACK_RESOURCE_FILE_LICENSE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
+set(CPACK_PACKAGE_DESCRIPTION_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
+
+set(CPACK_COMPONENTS_ALL applications documents sources)
+set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
+set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
+
+set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
+set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
+set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
+
+set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
+set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
+
+if(WIN32)
+ set(CPACK_GENERATOR "WIX")
+
+ # 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@/cpack_resources/License.rtf")
+ configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
+
+ set(CPACK_PACKAGE_FILE_NAME
+ "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
+
+else()
+ set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
+
+ if(CPACK_GENERATOR STREQUAL "DEB")
+ # Linux Debian package settings
+
+ set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
+ 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)
Deleted: trunk/ImageProcessing/opencv/components/BackGroundSubtractionSimple/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/BackGroundSubtractionSimple/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/BackGroundSubtractionSimple/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/BackGroundSubtractionSimple/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/BackGroundSubtractionSimple/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/BackGroundSubtractionSimple/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/Binarization/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/Binarization/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Binarization/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,299 +1,220 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(Binarization)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "Binarization Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS Binarization.cpp)
-
-set(LIBS_INCS Binarization.h)
-
-set(EXEC_SRCS BinarizationComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- Binarization.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
-# package settings
-set(CPACK_PACKAGE_NAME "${RTC_NAME}")
-set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
-set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
-set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
-set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
-
-set(CPACK_RESOURCE_FILE_LICENSE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
-set(CPACK_PACKAGE_DESCRIPTION_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
-
-set(CPACK_COMPONENTS_ALL applications documents sources)
-set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
-set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
-
-set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
-set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
-set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
-
-set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
-set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
-set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
-
-if(WIN32)
- set(CPACK_GENERATOR "WIX")
-
- # 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@/cpack_resources/License.rtf")
- configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
- "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
-
-else()
- set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
-
- if(CPACK_GENERATOR STREQUAL "DEB")
- # Linux Debian package settings
-
- set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
- 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)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(Binarization)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "Binarization Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS Binarization.cpp)
+
+set(LIBS_INCS Binarization.h)
+
+set(EXEC_SRCS BinarizationComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ Binarization.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "$ENV{OpenCV_DIR}")
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
Deleted: trunk/ImageProcessing/opencv/components/Binarization/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Binarization/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Binarization/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/Binarization/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Binarization/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Binarization/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,10 +1,10 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(components)
-if(WIN32)
- SUBDIRS(Affine BackGroundSubtractionSimple Binarization Chromakey Dilationerosion DirectShowCam Edge Findcontour Flip Histogram Houghline ImageCalibration ImageSubstraction ObjectTracking Perspective RockPaperScissors Rotate Scale Sepia SubStractCaptureImage Template Translate OpenCVCamera CameraViewer)
-else()
- SUBDIRS(Affine BackGroundSubtractionSimple Binarization Chromakey Dilationerosion Edge Findcontour Flip Histogram Houghline ImageCalibration ImageSubstraction ObjectTracking Perspective RockPaperScissors Rotate Scale Sepia SubStractCaptureImage Template Translate OpenCVCamera CameraViewer)
-endif()
-#SUBDIRS(Affine BackGroundSubtractionSimple Binarization Chromakey Dilationerosion Edge Findcontour Flip Histogram Houghline ImageCalibration ImageSubstraction ObjectTracking PGRCamera Perspective RockPaperScissors Rotate Scale Sepia SubStractCaptureImage Template Translate OpenCVCamera CameraViewer)
-#SUBDIRS(Affine BackGroundSubtractionSimple)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(components)
+if(WIN32)
+ SUBDIRS(Affine BackGroundSubtractionSimple Binarization Chromakey Dilationerosion DirectShowCam Edge Findcontour Flip Histogram Houghline ImageCalibration ImageSubstraction ObjectTracking Perspective RockPaperScissors Rotate Scale Sepia SubStractCaptureImage Template Translate OpenCVCamera CameraViewer)
+else()
+ SUBDIRS(Affine BackGroundSubtractionSimple Binarization Chromakey Dilationerosion Edge Findcontour Flip Histogram Houghline ImageCalibration ImageSubstraction ObjectTracking Perspective RockPaperScissors Rotate Scale Sepia SubStractCaptureImage Template Translate OpenCVCamera CameraViewer)
+endif()
+#SUBDIRS(Affine BackGroundSubtractionSimple Binarization Chromakey Dilationerosion Edge Findcontour Flip Histogram Houghline ImageCalibration ImageSubstraction ObjectTracking PGRCamera Perspective RockPaperScissors Rotate Scale Sepia SubStractCaptureImage Template Translate OpenCVCamera CameraViewer)
+#SUBDIRS(Affine BackGroundSubtractionSimple)
Modified: trunk/ImageProcessing/opencv/components/CameraViewer/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/CameraViewer/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/CameraViewer/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,299 +1,299 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(CameraViewer)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "CameraViewer Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS CameraViewer.cpp)
-
-set(LIBS_INCS CameraViewer.h)
-
-set(EXEC_SRCS CameraViewerComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- CameraViewer.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-#find_package(Doxygen)
-#if(DOXYGEN_FOUND STREQUAL "NO")
-# message(FATAL_ERROR "Doxygen not found.")
-#endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
-# package settings
-#set(CPACK_PACKAGE_NAME "${RTC_NAME}")
-#set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
-#set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
-#set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
-#set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-#set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
-#set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
-#set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
-#
-#set(CPACK_RESOURCE_FILE_LICENSE
-# "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
-#set(CPACK_PACKAGE_DESCRIPTION_FILE
-# "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
-#
-#set(CPACK_COMPONENTS_ALL applications documents sources)
-#set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
-#set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
-#set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
-#
-#set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
-#set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
-#set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
-#
-#set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
-#set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
-#set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
-#
-#if(WIN32)
-# set(CPACK_GENERATOR "WIX")
-#
-# # 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@/cpack_resources/License.rtf")
-# configure_file(
-# "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
-# "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
-#
-# set(CPACK_PACKAGE_FILE_NAME
-# "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
-#
-#else()
-# set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
-#
-# if(CPACK_GENERATOR STREQUAL "DEB")
-# # Linux Debian package settings
-#
-# set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
-# 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)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(CameraViewer)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "CameraViewer Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS CameraViewer.cpp)
+
+set(LIBS_INCS CameraViewer.h)
+
+set(EXEC_SRCS CameraViewerComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ CameraViewer.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+#find_package(Doxygen)
+#if(DOXYGEN_FOUND STREQUAL "NO")
+# message(FATAL_ERROR "Doxygen not found.")
+#endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
+# package settings
+#set(CPACK_PACKAGE_NAME "${RTC_NAME}")
+#set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
+#set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
+#set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
+#set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+#set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
+#set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
+#set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
+#
+#set(CPACK_RESOURCE_FILE_LICENSE
+# "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
+#set(CPACK_PACKAGE_DESCRIPTION_FILE
+# "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
+#
+#set(CPACK_COMPONENTS_ALL applications documents sources)
+#set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
+#set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
+#set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
+#
+#set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
+#set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
+#set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
+#
+#set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+#set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
+#set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
+#
+#if(WIN32)
+# set(CPACK_GENERATOR "WIX")
+#
+# # 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@/cpack_resources/License.rtf")
+# configure_file(
+# "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
+# "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
+#
+# set(CPACK_PACKAGE_FILE_NAME
+# "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
+#
+#else()
+# set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
+#
+# if(CPACK_GENERATOR STREQUAL "DEB")
+# # Linux Debian package settings
+#
+# set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
+# 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)
Deleted: trunk/ImageProcessing/opencv/components/CameraViewer/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/CameraViewer/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/CameraViewer/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/CameraViewer/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/CameraViewer/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/CameraViewer/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/Chromakey/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/Chromakey/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Chromakey/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,299 +1,299 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(Chromakey)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "Chromakey Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS Chromakey.cpp)
-
-set(LIBS_INCS Chromakey.h)
-
-set(EXEC_SRCS ChromakeyComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- Chromakey.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
-# package settings
-set(CPACK_PACKAGE_NAME "${RTC_NAME}")
-set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
-set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
-set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
-set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
-
-set(CPACK_RESOURCE_FILE_LICENSE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
-set(CPACK_PACKAGE_DESCRIPTION_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
-
-set(CPACK_COMPONENTS_ALL applications documents sources)
-set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
-set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
-
-set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
-set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
-set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
-
-set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
-set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
-set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
-
-if(WIN32)
- set(CPACK_GENERATOR "WIX")
-
- # 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@/cpack_resources/License.rtf")
- configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
- "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
-
-else()
- set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
-
- if(CPACK_GENERATOR STREQUAL "DEB")
- # Linux Debian package settings
-
- set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
- 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)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(Chromakey)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "Chromakey Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS Chromakey.cpp)
+
+set(LIBS_INCS Chromakey.h)
+
+set(EXEC_SRCS ChromakeyComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ Chromakey.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
+# package settings
+set(CPACK_PACKAGE_NAME "${RTC_NAME}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
+set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
+
+set(CPACK_RESOURCE_FILE_LICENSE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
+set(CPACK_PACKAGE_DESCRIPTION_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
+
+set(CPACK_COMPONENTS_ALL applications documents sources)
+set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
+set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
+
+set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
+set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
+set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
+
+set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
+set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
+
+if(WIN32)
+ set(CPACK_GENERATOR "WIX")
+
+ # 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@/cpack_resources/License.rtf")
+ configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
+
+ set(CPACK_PACKAGE_FILE_NAME
+ "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
+
+else()
+ set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
+
+ if(CPACK_GENERATOR STREQUAL "DEB")
+ # Linux Debian package settings
+
+ set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
+ 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)
Deleted: trunk/ImageProcessing/opencv/components/Chromakey/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Chromakey/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Chromakey/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/Chromakey/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Chromakey/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Chromakey/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/Dilationerosion/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/Dilationerosion/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Dilationerosion/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,299 +1,299 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(DilationErosion)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "DilationErosion Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS DilationErosion.cpp)
-
-set(LIBS_INCS DilationErosion.h)
-
-set(EXEC_SRCS DilationErosionComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- DilationErosion.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
-# package settings
-set(CPACK_PACKAGE_NAME "${RTC_NAME}")
-set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
-set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
-set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
-set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
-
-set(CPACK_RESOURCE_FILE_LICENSE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
-set(CPACK_PACKAGE_DESCRIPTION_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
-
-set(CPACK_COMPONENTS_ALL applications documents sources)
-set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
-set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
-
-set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
-set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
-set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
-
-set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
-set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
-set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
-
-if(WIN32)
- set(CPACK_GENERATOR "WIX")
-
- # 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@/cpack_resources/License.rtf")
- configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
- "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
-
-else()
- set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
-
- if(CPACK_GENERATOR STREQUAL "DEB")
- # Linux Debian package settings
-
- set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
- 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)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(DilationErosion)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "DilationErosion Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS DilationErosion.cpp)
+
+set(LIBS_INCS DilationErosion.h)
+
+set(EXEC_SRCS DilationErosionComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ DilationErosion.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
+# package settings
+set(CPACK_PACKAGE_NAME "${RTC_NAME}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
+set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
+
+set(CPACK_RESOURCE_FILE_LICENSE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
+set(CPACK_PACKAGE_DESCRIPTION_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
+
+set(CPACK_COMPONENTS_ALL applications documents sources)
+set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
+set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
+
+set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
+set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
+set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
+
+set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
+set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
+
+if(WIN32)
+ set(CPACK_GENERATOR "WIX")
+
+ # 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@/cpack_resources/License.rtf")
+ configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
+
+ set(CPACK_PACKAGE_FILE_NAME
+ "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
+
+else()
+ set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
+
+ if(CPACK_GENERATOR STREQUAL "DEB")
+ # Linux Debian package settings
+
+ set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
+ 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)
Deleted: trunk/ImageProcessing/opencv/components/Dilationerosion/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Dilationerosion/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Dilationerosion/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/Dilationerosion/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Dilationerosion/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Dilationerosion/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/DirectShowCam/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/DirectShowCam/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/DirectShowCam/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,303 +1,303 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(DirectShowCam)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "DirectShowCam Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS DirectShowCam.cpp)
-
-set(LIBS_INCS DirectShowCam.h)
-
-set(EXEC_SRCS DirectShowCamComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- DirectShowCam.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-list(APPEND LIBRARIES "strmbase")
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-list(APPEND INCLUDE_DIRS "$ENV{WindowsSdkDir}/Samples/Multimedia/DirectShow/BaseClasses")
-
-include_directories(${INCLUDE_DIRS})
-
-list(APPEND LIBRARY_DIRS ${PROJECT_SOURCE_DIR})
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
-# package settings
-set(CPACK_PACKAGE_NAME "${RTC_NAME}")
-set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
-set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
-set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
-set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
-
-set(CPACK_RESOURCE_FILE_LICENSE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
-set(CPACK_PACKAGE_DESCRIPTION_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
-
-set(CPACK_COMPONENTS_ALL applications documents sources)
-set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
-set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
-
-set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
-set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
-set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
-
-set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
-set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
-set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
-
-if(WIN32)
- set(CPACK_GENERATOR "WIX")
-
- # 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@/cpack_resources/License.rtf")
- configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
- "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
-
-else()
- set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
-
- if(CPACK_GENERATOR STREQUAL "DEB")
- # Linux Debian package settings
-
- set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
- 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)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(DirectShowCam)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "DirectShowCam Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS DirectShowCam.cpp)
+
+set(LIBS_INCS DirectShowCam.h)
+
+set(EXEC_SRCS DirectShowCamComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ DirectShowCam.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS} "$ENV{WindowsSdkDir}/Samples/Multimedia/DirectShow/BaseClasses")
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+list(APPEND LIBRARIES "strmbase")
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+list(APPEND INCLUDE_DIRS "$ENV{WindowsSdkDir}/Samples/Multimedia/DirectShow/BaseClasses")
+
+include_directories(${INCLUDE_DIRS})
+
+list(APPEND LIBRARY_DIRS ${PROJECT_SOURCE_DIR} "$ENV{WindowsSdkDir}/Samples/Multimedia/DirectShow/BaseClasses")
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
+# package settings
+set(CPACK_PACKAGE_NAME "${RTC_NAME}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
+set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
+
+set(CPACK_RESOURCE_FILE_LICENSE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
+set(CPACK_PACKAGE_DESCRIPTION_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
+
+set(CPACK_COMPONENTS_ALL applications documents sources)
+set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
+set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
+
+set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
+set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
+set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
+
+set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
+set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
+
+if(WIN32)
+ set(CPACK_GENERATOR "WIX")
+
+ # 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@/cpack_resources/License.rtf")
+ configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
+
+ set(CPACK_PACKAGE_FILE_NAME
+ "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
+
+else()
+ set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
+
+ if(CPACK_GENERATOR STREQUAL "DEB")
+ # Linux Debian package settings
+
+ set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
+ 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)
Deleted: trunk/ImageProcessing/opencv/components/DirectShowCam/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/DirectShowCam/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/DirectShowCam/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/DirectShowCam/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/DirectShowCam/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/DirectShowCam/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/Edge/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/Edge/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Edge/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,221 +1,221 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(Edge)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "Edge Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS Edge.cpp)
-
-set(LIBS_INCS Edge.h)
-
-set(EXEC_SRCS EdgeComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- Edge.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-#find_package(Doxygen)
-#if(DOXYGEN_FOUND STREQUAL "NO")
-# message(FATAL_ERROR "Doxygen not found.")
-#endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(Edge)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "Edge Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS Edge.cpp)
+
+set(LIBS_INCS Edge.h)
+
+set(EXEC_SRCS EdgeComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ Edge.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+#find_package(Doxygen)
+#if(DOXYGEN_FOUND STREQUAL "NO")
+# message(FATAL_ERROR "Doxygen not found.")
+#endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
Deleted: trunk/ImageProcessing/opencv/components/Edge/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Edge/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Edge/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/Edge/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Edge/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Edge/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/Findcontour/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/Findcontour/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Findcontour/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,220 +1,220 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(Findcontour)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "Findcontour Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS Findcontour.cpp)
-
-set(LIBS_INCS Findcontour.h)
-
-set(EXEC_SRCS FindcontourComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- Findcontour.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-##get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(Findcontour)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "Findcontour Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS Findcontour.cpp)
+
+set(LIBS_INCS Findcontour.h)
+
+set(EXEC_SRCS FindcontourComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ Findcontour.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+##get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
Deleted: trunk/ImageProcessing/opencv/components/Findcontour/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Findcontour/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Findcontour/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/Findcontour/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Findcontour/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Findcontour/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/Flip/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/Flip/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Flip/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,299 +1,299 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(Flip)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "Flip Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS Flip.cpp)
-
-set(LIBS_INCS Flip.h)
-
-set(EXEC_SRCS FlipComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- Flip.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
-# package settings
-set(CPACK_PACKAGE_NAME "${RTC_NAME}")
-set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
-set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
-set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
-set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
-
-set(CPACK_RESOURCE_FILE_LICENSE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
-set(CPACK_PACKAGE_DESCRIPTION_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
-
-set(CPACK_COMPONENTS_ALL applications documents sources)
-set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
-set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
-
-set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
-set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
-set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
-
-set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
-set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
-set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
-
-if(WIN32)
- set(CPACK_GENERATOR "WIX")
-
- # 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@/cpack_resources/License.rtf")
- configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
- "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
-
-else()
- set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
-
- if(CPACK_GENERATOR STREQUAL "DEB")
- # Linux Debian package settings
-
- set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
- 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)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(Flip)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "Flip Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS Flip.cpp)
+
+set(LIBS_INCS Flip.h)
+
+set(EXEC_SRCS FlipComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ Flip.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
+# package settings
+set(CPACK_PACKAGE_NAME "${RTC_NAME}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
+set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
+
+set(CPACK_RESOURCE_FILE_LICENSE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
+set(CPACK_PACKAGE_DESCRIPTION_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
+
+set(CPACK_COMPONENTS_ALL applications documents sources)
+set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
+set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
+
+set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
+set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
+set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
+
+set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
+set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
+
+if(WIN32)
+ set(CPACK_GENERATOR "WIX")
+
+ # 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@/cpack_resources/License.rtf")
+ configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
+
+ set(CPACK_PACKAGE_FILE_NAME
+ "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
+
+else()
+ set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
+
+ if(CPACK_GENERATOR STREQUAL "DEB")
+ # Linux Debian package settings
+
+ set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
+ 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)
Deleted: trunk/ImageProcessing/opencv/components/Flip/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Flip/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Flip/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/Flip/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Flip/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Flip/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/Histogram/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/Histogram/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Histogram/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,299 +1,299 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(Histogram)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "Histogram Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS Histogram.cpp)
-
-set(LIBS_INCS Histogram.h)
-
-set(EXEC_SRCS HistogramComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- Histogram.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
-# package settings
-set(CPACK_PACKAGE_NAME "${RTC_NAME}")
-set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
-set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
-set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
-set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
-
-set(CPACK_RESOURCE_FILE_LICENSE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
-set(CPACK_PACKAGE_DESCRIPTION_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
-
-set(CPACK_COMPONENTS_ALL applications documents sources)
-set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
-set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
-
-set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
-set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
-set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
-
-set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
-set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
-set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
-
-if(WIN32)
- set(CPACK_GENERATOR "WIX")
-
- # 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@/cpack_resources/License.rtf")
- configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
- "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
-
-else()
- set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
-
- if(CPACK_GENERATOR STREQUAL "DEB")
- # Linux Debian package settings
-
- set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
- 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)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(Histogram)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "Histogram Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS Histogram.cpp)
+
+set(LIBS_INCS Histogram.h)
+
+set(EXEC_SRCS HistogramComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ Histogram.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
+# package settings
+set(CPACK_PACKAGE_NAME "${RTC_NAME}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
+set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
+
+set(CPACK_RESOURCE_FILE_LICENSE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
+set(CPACK_PACKAGE_DESCRIPTION_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
+
+set(CPACK_COMPONENTS_ALL applications documents sources)
+set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
+set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
+
+set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
+set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
+set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
+
+set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
+set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
+
+if(WIN32)
+ set(CPACK_GENERATOR "WIX")
+
+ # 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@/cpack_resources/License.rtf")
+ configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
+
+ set(CPACK_PACKAGE_FILE_NAME
+ "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
+
+else()
+ set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
+
+ if(CPACK_GENERATOR STREQUAL "DEB")
+ # Linux Debian package settings
+
+ set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
+ 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)
Deleted: trunk/ImageProcessing/opencv/components/Histogram/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Histogram/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Histogram/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/Histogram/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Histogram/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Histogram/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/Houghline/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/Houghline/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Houghline/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,221 +1,221 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(Hough)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "Hough Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS Hough.cpp)
-
-set(LIBS_INCS Hough.h)
-
-set(EXEC_SRCS HoughComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- Hough.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(Hough)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "Hough Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS Hough.cpp)
+
+set(LIBS_INCS Hough.h)
+
+set(EXEC_SRCS HoughComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ Hough.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
Deleted: trunk/ImageProcessing/opencv/components/Houghline/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Houghline/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Houghline/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/Houghline/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Houghline/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Houghline/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/ImageCalibration/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/ImageCalibration/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/ImageCalibration/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,299 +1,299 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(ImageCalibration)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "ImageCalibration Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS ImageCalibration.cpp)
-
-set(LIBS_INCS ImageCalibration.h)
-
-set(EXEC_SRCS ImageCalibrationComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- ImageCalibration.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
-# package settings
-set(CPACK_PACKAGE_NAME "${RTC_NAME}")
-set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
-set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
-set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
-set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
-
-set(CPACK_RESOURCE_FILE_LICENSE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
-set(CPACK_PACKAGE_DESCRIPTION_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
-
-set(CPACK_COMPONENTS_ALL applications documents sources)
-set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
-set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
-
-set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
-set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
-set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
-
-set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
-set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
-set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
-
-if(WIN32)
- set(CPACK_GENERATOR "WIX")
-
- # 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@/cpack_resources/License.rtf")
- configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
- "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
-
-else()
- set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
-
- if(CPACK_GENERATOR STREQUAL "DEB")
- # Linux Debian package settings
-
- set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
- 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)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(ImageCalibration)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "ImageCalibration Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS ImageCalibration.cpp)
+
+set(LIBS_INCS ImageCalibration.h)
+
+set(EXEC_SRCS ImageCalibrationComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ ImageCalibration.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
+# package settings
+set(CPACK_PACKAGE_NAME "${RTC_NAME}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
+set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
+
+set(CPACK_RESOURCE_FILE_LICENSE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
+set(CPACK_PACKAGE_DESCRIPTION_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
+
+set(CPACK_COMPONENTS_ALL applications documents sources)
+set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
+set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
+
+set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
+set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
+set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
+
+set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
+set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
+
+if(WIN32)
+ set(CPACK_GENERATOR "WIX")
+
+ # 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@/cpack_resources/License.rtf")
+ configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
+
+ set(CPACK_PACKAGE_FILE_NAME
+ "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
+
+else()
+ set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
+
+ if(CPACK_GENERATOR STREQUAL "DEB")
+ # Linux Debian package settings
+
+ set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
+ 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)
Deleted: trunk/ImageProcessing/opencv/components/ImageCalibration/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/ImageCalibration/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/ImageCalibration/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/ImageCalibration/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/ImageCalibration/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/ImageCalibration/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/ImageSubstraction/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/ImageSubstraction/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/ImageSubstraction/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,299 +1,299 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(ImageSubstraction)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "ImageSubstraction Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS ImageSubstraction.cpp)
-
-set(LIBS_INCS ImageSubstraction.h)
-
-set(EXEC_SRCS ImageSubstractionComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- ImageSubstraction.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
-# package settings
-set(CPACK_PACKAGE_NAME "${RTC_NAME}")
-set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
-set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
-set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
-set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
-
-set(CPACK_RESOURCE_FILE_LICENSE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
-set(CPACK_PACKAGE_DESCRIPTION_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
-
-set(CPACK_COMPONENTS_ALL applications documents sources)
-set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
-set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
-
-set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
-set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
-set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
-
-set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
-set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
-set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
-
-if(WIN32)
- set(CPACK_GENERATOR "WIX")
-
- # 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@/cpack_resources/License.rtf")
- configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
- "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
-
-else()
- set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
-
- if(CPACK_GENERATOR STREQUAL "DEB")
- # Linux Debian package settings
-
- set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
- 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)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(ImageSubstraction)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "ImageSubstraction Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS ImageSubstraction.cpp)
+
+set(LIBS_INCS ImageSubstraction.h)
+
+set(EXEC_SRCS ImageSubstractionComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ ImageSubstraction.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
+# package settings
+set(CPACK_PACKAGE_NAME "${RTC_NAME}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
+set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
+
+set(CPACK_RESOURCE_FILE_LICENSE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
+set(CPACK_PACKAGE_DESCRIPTION_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
+
+set(CPACK_COMPONENTS_ALL applications documents sources)
+set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
+set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
+
+set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
+set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
+set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
+
+set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
+set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
+
+if(WIN32)
+ set(CPACK_GENERATOR "WIX")
+
+ # 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@/cpack_resources/License.rtf")
+ configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
+
+ set(CPACK_PACKAGE_FILE_NAME
+ "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
+
+else()
+ set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
+
+ if(CPACK_GENERATOR STREQUAL "DEB")
+ # Linux Debian package settings
+
+ set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
+ 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)
Deleted: trunk/ImageProcessing/opencv/components/ImageSubstraction/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/ImageSubstraction/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/ImageSubstraction/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/ImageSubstraction/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/ImageSubstraction/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/ImageSubstraction/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/ObjectTracking/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/ObjectTracking/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/ObjectTracking/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,299 +1,299 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(ObjectTracking)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "ObjectTracking Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS ObjectTracking.cpp)
-
-set(LIBS_INCS ObjectTracking.h)
-
-set(EXEC_SRCS ObjectTrackingComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- ObjectTracking.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
-# package settings
-set(CPACK_PACKAGE_NAME "${RTC_NAME}")
-set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
-set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
-set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
-set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
-
-set(CPACK_RESOURCE_FILE_LICENSE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
-set(CPACK_PACKAGE_DESCRIPTION_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
-
-set(CPACK_COMPONENTS_ALL applications documents sources)
-set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
-set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
-
-set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
-set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
-set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
-
-set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
-set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
-set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
-
-if(WIN32)
- set(CPACK_GENERATOR "WIX")
-
- # 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@/cpack_resources/License.rtf")
- configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
- "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
-
-else()
- set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
-
- if(CPACK_GENERATOR STREQUAL "DEB")
- # Linux Debian package settings
-
- set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
- 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)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(ObjectTracking)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "ObjectTracking Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS ObjectTracking.cpp)
+
+set(LIBS_INCS ObjectTracking.h)
+
+set(EXEC_SRCS ObjectTrackingComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ ObjectTracking.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
+# package settings
+set(CPACK_PACKAGE_NAME "${RTC_NAME}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
+set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
+
+set(CPACK_RESOURCE_FILE_LICENSE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
+set(CPACK_PACKAGE_DESCRIPTION_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
+
+set(CPACK_COMPONENTS_ALL applications documents sources)
+set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
+set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
+
+set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
+set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
+set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
+
+set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
+set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
+
+if(WIN32)
+ set(CPACK_GENERATOR "WIX")
+
+ # 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@/cpack_resources/License.rtf")
+ configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
+
+ set(CPACK_PACKAGE_FILE_NAME
+ "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
+
+else()
+ set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
+
+ if(CPACK_GENERATOR STREQUAL "DEB")
+ # Linux Debian package settings
+
+ set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
+ 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)
Deleted: trunk/ImageProcessing/opencv/components/ObjectTracking/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/ObjectTracking/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/ObjectTracking/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/ObjectTracking/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/ObjectTracking/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/ObjectTracking/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/OpenCVCamera/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/OpenCVCamera/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/OpenCVCamera/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,221 +1,221 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(OpenCVCamera)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "OpenCVCamera Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS OpenCVCamera.cpp)
-
-set(LIBS_INCS OpenCVCamera.h)
-
-set(EXEC_SRCS OpenCVCameraComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- OpenCVCamera.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(OpenCVCamera)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "OpenCVCamera Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS OpenCVCamera.cpp)
+
+set(LIBS_INCS OpenCVCamera.h)
+
+set(EXEC_SRCS OpenCVCameraComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ OpenCVCamera.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
Deleted: trunk/ImageProcessing/opencv/components/OpenCVCamera/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/OpenCVCamera/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/OpenCVCamera/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/OpenCVCamera/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/OpenCVCamera/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/OpenCVCamera/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Deleted: trunk/ImageProcessing/opencv/components/PGRCamera/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/PGRCamera/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/PGRCamera/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/PGRCamera/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/PGRCamera/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/PGRCamera/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/Perspective/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/Perspective/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Perspective/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,300 +1,300 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(Perspective)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "Perspective Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS Perspective.cpp)
-
-set(LIBS_INCS Perspective.h)
-
-set(EXEC_SRCS PerspectiveComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- Perspective.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-#add_definitions(-I${CMAKE_CURRENT_BINARY_DIR})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
-# package settings
-set(CPACK_PACKAGE_NAME "${RTC_NAME}")
-set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
-set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
-set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
-set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
-
-set(CPACK_RESOURCE_FILE_LICENSE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
-set(CPACK_PACKAGE_DESCRIPTION_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
-
-set(CPACK_COMPONENTS_ALL applications documents sources)
-set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
-set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
-
-set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
-set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
-set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
-
-set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
-set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
-set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
-
-if(WIN32)
- set(CPACK_GENERATOR "WIX")
-
- # 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@/cpack_resources/License.rtf")
- configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
- "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
-
-else()
- set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
-
- if(CPACK_GENERATOR STREQUAL "DEB")
- # Linux Debian package settings
-
- set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
- 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)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(Perspective)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "Perspective Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS Perspective.cpp)
+
+set(LIBS_INCS Perspective.h)
+
+set(EXEC_SRCS PerspectiveComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ Perspective.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+#add_definitions(-I${CMAKE_CURRENT_BINARY_DIR})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
+# package settings
+set(CPACK_PACKAGE_NAME "${RTC_NAME}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
+set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
+
+set(CPACK_RESOURCE_FILE_LICENSE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
+set(CPACK_PACKAGE_DESCRIPTION_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
+
+set(CPACK_COMPONENTS_ALL applications documents sources)
+set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
+set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
+
+set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
+set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
+set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
+
+set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
+set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
+
+if(WIN32)
+ set(CPACK_GENERATOR "WIX")
+
+ # 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@/cpack_resources/License.rtf")
+ configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
+
+ set(CPACK_PACKAGE_FILE_NAME
+ "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
+
+else()
+ set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
+
+ if(CPACK_GENERATOR STREQUAL "DEB")
+ # Linux Debian package settings
+
+ set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
+ 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)
Deleted: trunk/ImageProcessing/opencv/components/Perspective/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Perspective/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Perspective/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/Perspective/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Perspective/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Perspective/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/RockPaperScissors/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/RockPaperScissors/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/RockPaperScissors/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,221 +1,221 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(RockPaperScissors)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "RockPaperScissors Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS RockPaperScissors.cpp)
-
-set(LIBS_INCS RockPaperScissors.h)
-
-set(EXEC_SRCS RockPaperScissorsComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- RockPaperScissors.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(RockPaperScissors)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "RockPaperScissors Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS RockPaperScissors.cpp)
+
+set(LIBS_INCS RockPaperScissors.h)
+
+set(EXEC_SRCS RockPaperScissorsComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ RockPaperScissors.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
Deleted: trunk/ImageProcessing/opencv/components/RockPaperScissors/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/RockPaperScissors/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/RockPaperScissors/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/RockPaperScissors/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/RockPaperScissors/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/RockPaperScissors/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/Rotate/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/Rotate/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Rotate/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,299 +1,299 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(Rotate)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "Rotate Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS Rotate.cpp)
-
-set(LIBS_INCS Rotate.h)
-
-set(EXEC_SRCS RotateComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- Rotate.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
-# package settings
-set(CPACK_PACKAGE_NAME "${RTC_NAME}")
-set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
-set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
-set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
-set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
-
-set(CPACK_RESOURCE_FILE_LICENSE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
-set(CPACK_PACKAGE_DESCRIPTION_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
-
-set(CPACK_COMPONENTS_ALL applications documents sources)
-set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
-set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
-
-set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
-set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
-set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
-
-set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
-set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
-set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
-
-if(WIN32)
- set(CPACK_GENERATOR "WIX")
-
- # 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@/cpack_resources/License.rtf")
- configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
- "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
-
-else()
- set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
-
- if(CPACK_GENERATOR STREQUAL "DEB")
- # Linux Debian package settings
-
- set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
- 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)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(Rotate)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "Rotate Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS Rotate.cpp)
+
+set(LIBS_INCS Rotate.h)
+
+set(EXEC_SRCS RotateComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ Rotate.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
+# package settings
+set(CPACK_PACKAGE_NAME "${RTC_NAME}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
+set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
+
+set(CPACK_RESOURCE_FILE_LICENSE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
+set(CPACK_PACKAGE_DESCRIPTION_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
+
+set(CPACK_COMPONENTS_ALL applications documents sources)
+set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
+set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
+
+set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
+set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
+set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
+
+set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
+set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
+
+if(WIN32)
+ set(CPACK_GENERATOR "WIX")
+
+ # 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@/cpack_resources/License.rtf")
+ configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
+
+ set(CPACK_PACKAGE_FILE_NAME
+ "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
+
+else()
+ set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
+
+ if(CPACK_GENERATOR STREQUAL "DEB")
+ # Linux Debian package settings
+
+ set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
+ 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)
Deleted: trunk/ImageProcessing/opencv/components/Rotate/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Rotate/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Rotate/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/Rotate/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Rotate/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Rotate/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/Scale/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/Scale/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Scale/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,299 +1,299 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(Scale)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "Scale Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS Scale.cpp)
-
-set(LIBS_INCS Scale.h)
-
-set(EXEC_SRCS ScaleComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- Scale.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
-# package settings
-set(CPACK_PACKAGE_NAME "${RTC_NAME}")
-set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
-set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
-set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
-set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
-
-set(CPACK_RESOURCE_FILE_LICENSE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
-set(CPACK_PACKAGE_DESCRIPTION_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
-
-set(CPACK_COMPONENTS_ALL applications documents sources)
-set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
-set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
-
-set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
-set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
-set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
-
-set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
-set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
-set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
-
-if(WIN32)
- set(CPACK_GENERATOR "WIX")
-
- # 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@/cpack_resources/License.rtf")
- configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
- "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
-
-else()
- set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
-
- if(CPACK_GENERATOR STREQUAL "DEB")
- # Linux Debian package settings
-
- set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
- 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)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(Scale)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "Scale Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS Scale.cpp)
+
+set(LIBS_INCS Scale.h)
+
+set(EXEC_SRCS ScaleComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ Scale.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
+# package settings
+set(CPACK_PACKAGE_NAME "${RTC_NAME}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
+set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
+
+set(CPACK_RESOURCE_FILE_LICENSE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
+set(CPACK_PACKAGE_DESCRIPTION_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
+
+set(CPACK_COMPONENTS_ALL applications documents sources)
+set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
+set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
+
+set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
+set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
+set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
+
+set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
+set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
+
+if(WIN32)
+ set(CPACK_GENERATOR "WIX")
+
+ # 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@/cpack_resources/License.rtf")
+ configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
+
+ set(CPACK_PACKAGE_FILE_NAME
+ "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
+
+else()
+ set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
+
+ if(CPACK_GENERATOR STREQUAL "DEB")
+ # Linux Debian package settings
+
+ set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
+ 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)
Deleted: trunk/ImageProcessing/opencv/components/Scale/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Scale/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Scale/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/Scale/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Scale/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Scale/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/Sepia/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/Sepia/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Sepia/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,299 +1,299 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(Sepia)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "Sepia Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS Sepia.cpp)
-
-set(LIBS_INCS Sepia.h)
-
-set(EXEC_SRCS SepiaComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- Sepia.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
-# package settings
-set(CPACK_PACKAGE_NAME "${RTC_NAME}")
-set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
-set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
-set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
-set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
-
-set(CPACK_RESOURCE_FILE_LICENSE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
-set(CPACK_PACKAGE_DESCRIPTION_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
-
-set(CPACK_COMPONENTS_ALL applications documents sources)
-set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
-set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
-
-set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
-set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
-set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
-
-set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
-set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
-set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
-
-if(WIN32)
- set(CPACK_GENERATOR "WIX")
-
- # 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@/cpack_resources/License.rtf")
- configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
- "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
-
-else()
- set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
-
- if(CPACK_GENERATOR STREQUAL "DEB")
- # Linux Debian package settings
-
- set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
- 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)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(Sepia)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "Sepia Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS Sepia.cpp)
+
+set(LIBS_INCS Sepia.h)
+
+set(EXEC_SRCS SepiaComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ Sepia.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
+# package settings
+set(CPACK_PACKAGE_NAME "${RTC_NAME}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
+set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
+
+set(CPACK_RESOURCE_FILE_LICENSE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
+set(CPACK_PACKAGE_DESCRIPTION_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
+
+set(CPACK_COMPONENTS_ALL applications documents sources)
+set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
+set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
+
+set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
+set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
+set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
+
+set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
+set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
+
+if(WIN32)
+ set(CPACK_GENERATOR "WIX")
+
+ # 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@/cpack_resources/License.rtf")
+ configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
+
+ set(CPACK_PACKAGE_FILE_NAME
+ "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
+
+else()
+ set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
+
+ if(CPACK_GENERATOR STREQUAL "DEB")
+ # Linux Debian package settings
+
+ set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
+ 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)
Deleted: trunk/ImageProcessing/opencv/components/Sepia/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Sepia/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Sepia/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/Sepia/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Sepia/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Sepia/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/SubStractCaptureImage/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/SubStractCaptureImage/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/SubStractCaptureImage/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,299 +1,299 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(SubStractCaptureImage)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "SubStractCaptureImage Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS SubStractCaptureImage.cpp)
-
-set(LIBS_INCS SubStractCaptureImage.h)
-
-set(EXEC_SRCS SubStractCaptureImageComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- SubStractCaptureImage.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
-# package settings
-set(CPACK_PACKAGE_NAME "${RTC_NAME}")
-set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
-set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
-set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
-set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
-
-set(CPACK_RESOURCE_FILE_LICENSE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
-set(CPACK_PACKAGE_DESCRIPTION_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
-
-set(CPACK_COMPONENTS_ALL applications documents sources)
-set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
-set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
-
-set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
-set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
-set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
-
-set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
-set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
-set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
-
-if(WIN32)
- set(CPACK_GENERATOR "WIX")
-
- # 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@/cpack_resources/License.rtf")
- configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
- "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
-
-else()
- set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
-
- if(CPACK_GENERATOR STREQUAL "DEB")
- # Linux Debian package settings
-
- set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
- 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)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(SubStractCaptureImage)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "SubStractCaptureImage Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS SubStractCaptureImage.cpp)
+
+set(LIBS_INCS SubStractCaptureImage.h)
+
+set(EXEC_SRCS SubStractCaptureImageComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ SubStractCaptureImage.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
+# package settings
+set(CPACK_PACKAGE_NAME "${RTC_NAME}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
+set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
+
+set(CPACK_RESOURCE_FILE_LICENSE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
+set(CPACK_PACKAGE_DESCRIPTION_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
+
+set(CPACK_COMPONENTS_ALL applications documents sources)
+set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
+set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
+
+set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
+set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
+set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
+
+set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
+set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
+
+if(WIN32)
+ set(CPACK_GENERATOR "WIX")
+
+ # 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@/cpack_resources/License.rtf")
+ configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
+
+ set(CPACK_PACKAGE_FILE_NAME
+ "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
+
+else()
+ set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
+
+ if(CPACK_GENERATOR STREQUAL "DEB")
+ # Linux Debian package settings
+
+ set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
+ 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)
Deleted: trunk/ImageProcessing/opencv/components/SubStractCaptureImage/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/SubStractCaptureImage/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/SubStractCaptureImage/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/SubStractCaptureImage/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/SubStractCaptureImage/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/SubStractCaptureImage/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/Template/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/Template/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Template/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,299 +1,299 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(Template)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "Template Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS Template.cpp)
-
-set(LIBS_INCS Template.h)
-
-set(EXEC_SRCS TemplateComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- Template.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
-# package settings
-set(CPACK_PACKAGE_NAME "${RTC_NAME}")
-set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
-set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
-set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
-set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
-
-set(CPACK_RESOURCE_FILE_LICENSE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
-set(CPACK_PACKAGE_DESCRIPTION_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
-
-set(CPACK_COMPONENTS_ALL applications documents sources)
-set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
-set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
-
-set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
-set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
-set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
-
-set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
-set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
-set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
-
-if(WIN32)
- set(CPACK_GENERATOR "WIX")
-
- # 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@/cpack_resources/License.rtf")
- configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
- "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
-
-else()
- set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
-
- if(CPACK_GENERATOR STREQUAL "DEB")
- # Linux Debian package settings
-
- set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
- 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)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(Template)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "Template Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS Template.cpp)
+
+set(LIBS_INCS Template.h)
+
+set(EXEC_SRCS TemplateComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ Template.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
+# package settings
+set(CPACK_PACKAGE_NAME "${RTC_NAME}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
+set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
+
+set(CPACK_RESOURCE_FILE_LICENSE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
+set(CPACK_PACKAGE_DESCRIPTION_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
+
+set(CPACK_COMPONENTS_ALL applications documents sources)
+set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
+set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
+
+set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
+set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
+set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
+
+set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
+set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
+
+if(WIN32)
+ set(CPACK_GENERATOR "WIX")
+
+ # 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@/cpack_resources/License.rtf")
+ configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
+
+ set(CPACK_PACKAGE_FILE_NAME
+ "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
+
+else()
+ set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
+
+ if(CPACK_GENERATOR STREQUAL "DEB")
+ # Linux Debian package settings
+
+ set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
+ 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)
Deleted: trunk/ImageProcessing/opencv/components/Template/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Template/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Template/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/Template/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Template/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Template/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
Modified: trunk/ImageProcessing/opencv/components/Translate/CMakeLists.txt
===================================================================
--- trunk/ImageProcessing/opencv/components/Translate/CMakeLists.txt 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Translate/CMakeLists.txt 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,299 +1,299 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
-
-project(Translate)
-
-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")
-
-
-# component settings
-set(RTC_NAME "${PROJECT_NAME}")
-set(RTC_VERSION "1.0.0")
-set(RTC_VERSION_MAJOR "1")
-set(RTC_VERSION_MINOR "0")
-set(RTC_VERSION_PATCH "0")
-set(RTC_LANG "c++")
-set(RTC_DESCRIPTION "Translate Agent Component")
-set(RTC_VENDOR "Shibaura Inst. of Tech, Tanaka & Fujita & Takasu")
-set(RTC_MAINTAINER "author at example.com")
-
-string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
-set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
-
-set(IDL_FILES ""
- # WiiInfo.idl
-)
-
-set(SKEL_SRCS ""
- # WiiInfoSkel.cpp
-)
-
-set(STUB_SRCS ""
-)
-
-set(IMPL_SRCS ""
- # WiiInfoSVC_impl.cpp
-)
-
-set(IMPL_INCS ""
- # WiiInfoSVC_impl.h
-)
-
-set(LIBS_SRCS Translate.cpp)
-
-set(LIBS_INCS Translate.h)
-
-set(EXEC_SRCS TranslateComp.cpp)
-
-set(OTHER_SRCS CMakeLists.txt Doxyfile.in
- Translate.conf rtc.conf)
-
-
-# check OpenRTM installed
-find_package(OpenRTM REQUIRED)
-
-list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
-list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
-list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
-list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
-
-# check doxygen installed
-find_package(Doxygen)
-if(DOXYGEN_FOUND STREQUAL "NO")
- message(FATAL_ERROR "Doxygen not found.")
-endif()
-
-
-if(WIN32)
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
- # set install path prefix
- set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
- set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
-else()
- # add command path
- set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
- set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
-endif()
-
-# check OpenCV installed
-find_package(OpenCV REQUIRED)
-
-list(APPEND INCLUDE_DIRS ${OPENCV_INCLUDE_DIRS})
-list(APPEND LIBRARY_DIRS ${OPENCV_LIBRARY_DIRS})
-list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
-
-
-# add uninstall target
-configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall_${RTC_NAME} COMMAND
- ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-
-# target settings for library/executable
-list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${INCLUDE_DIRS})
-
-link_directories(${LIBRARY_DIRS})
-
-add_definitions(${CFLAGS})
-
-foreach(idl ${IDL_FILES})
- string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
- add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
- COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
- COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
- DEPENDS ${idl})
-endforeach()
-
-if(CMAKE_COMPILER_IS_GNUCC)
- string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
-endif()
-
-add_library(${RTC_NAME} SHARED
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
-target_link_libraries(${RTC_NAME} ${LIBRARIES})
-set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
-set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-if(UNIX)
- add_library(${RTC_NAME}-static STATIC
- ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
- target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
- set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
- set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(UNIX)
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
-
- add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
-
-else()
- add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
- add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
- target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
- set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
-endif()
-
-if(WIN32)
- set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
- set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
-
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
- ADD_CUSTOM_COMMAND(
- TARGET ${RTC_NAME}Comp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
- "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
- )
-endif()
-
-install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
- ARCHIVE DESTINATION "${INSTALL_PREFIX}"
- RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
- COMPONENT "applications")
-
-
-# target settings for document
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
- "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-
-add_custom_target(doxygen_${RTC_NAME} COMMAND
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
-#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
-
-#get_target_property(DOC_TARGET doc TYPE)
-#if(NOT DOC_TARGET)
-# add_custom_target(doc)
-#endif()
-#add_dependencies(doc doxygen)
-
-#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
-# COMPONENT "documents")
-
-
-# install source files
-install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(FILES ${OTHER_SRCS}
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-install(DIRECTORY cmake_modules cpack_resources
- DESTINATION "${INSTALL_PREFIX}/src"
- COMPONENT "sources")
-
-
-# package settings
-set(CPACK_PACKAGE_NAME "${RTC_NAME}")
-set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
-set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
-set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
-set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
-
-set(CPACK_RESOURCE_FILE_LICENSE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
-set(CPACK_PACKAGE_DESCRIPTION_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
-
-set(CPACK_COMPONENTS_ALL applications documents sources)
-set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
-set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
-set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
-
-set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
-set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
-set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
-
-set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
-set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
-set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
-
-if(WIN32)
- set(CPACK_GENERATOR "WIX")
-
- # 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@/cpack_resources/License.rtf")
- configure_file(
- "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
- "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
-
- set(CPACK_PACKAGE_FILE_NAME
- "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
-
-else()
- set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
-
- if(CPACK_GENERATOR STREQUAL "DEB")
- # Linux Debian package settings
-
- set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
- 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)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+
+project(Translate)
+
+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")
+
+
+# component settings
+set(RTC_NAME "${PROJECT_NAME}")
+set(RTC_VERSION "1.0.0")
+set(RTC_VERSION_MAJOR "1")
+set(RTC_VERSION_MINOR "0")
+set(RTC_VERSION_PATCH "0")
+set(RTC_LANG "c++")
+set(RTC_DESCRIPTION "Translate Agent Component")
+set(RTC_VENDOR "AIST")
+set(RTC_MAINTAINER "openrtm at openrtm.org")
+
+string(TOLOWER ${RTC_NAME} PACKAGE_NAME)
+set(PACKAGE_VERSION "${RTC_VERSION_MAJOR}.${RTC_VERSION_MINOR}.${RTC_VERSION_PATCH}")
+
+set(IDL_FILES ""
+ # WiiInfo.idl
+)
+
+set(SKEL_SRCS ""
+ # WiiInfoSkel.cpp
+)
+
+set(STUB_SRCS ""
+)
+
+set(IMPL_SRCS ""
+ # WiiInfoSVC_impl.cpp
+)
+
+set(IMPL_INCS ""
+ # WiiInfoSVC_impl.h
+)
+
+set(LIBS_SRCS Translate.cpp)
+
+set(LIBS_INCS Translate.h)
+
+set(EXEC_SRCS TranslateComp.cpp)
+
+set(OTHER_SRCS CMakeLists.txt Doxyfile.in
+ Translate.conf rtc.conf)
+
+
+# check OpenRTM installed
+find_package(OpenRTM REQUIRED)
+
+list(APPEND CFLAGS ${OMNIORB_CFLAGS} ${OPENRTM_CFLAGS})
+list(APPEND INCLUDE_DIRS ${OMNIORB_INCLUDE_DIRS} ${OPENRTM_INCLUDE_DIRS})
+list(APPEND LDFLAGS ${OMNIORB_LDFLAGS} ${OPENRTM_LDFLAGS})
+list(APPEND LIBRARY_DIRS ${OMNIORB_LIBRARY_DIRS} ${OPENRTM_LIBRARY_DIRS})
+list(APPEND LIBRARIES ${OMNIORB_LIBRARIES} ${OPENRTM_LIBRARIES})
+
+# check doxygen installed
+find_package(Doxygen)
+if(DOXYGEN_FOUND STREQUAL "NO")
+ message(FATAL_ERROR "Doxygen not found.")
+endif()
+
+
+if(WIN32)
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_DIR}/bin/x86_win32")
+ # set install path prefix
+ set(CMAKE_INSTALL_PREFIX "${OPENRTM_DIR}")
+ set(INSTALL_PREFIX "components/${RTC_LANG}/${PACKAGE_NAME}${PACKAGE_VERSION}")
+else()
+ # add command path
+ set($ENV{PATH} $ENV{PATH} "${OPENRTM_DIR}/bin")
+ set($ENV{PATH} $ENV{PATH} "${OMNIORB_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}")
+endif()
+
+# check OpenCV installed
+find_package(OpenCV REQUIRED)
+
+list(APPEND INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+list(APPEND LIBRARY_DIRS ${OpenCV_LIB_DIRS})
+list(APPEND LIBRARIES ${OpenCV_LIBS})
+
+
+# add uninstall target
+configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+ IMMEDIATE @ONLY)
+add_custom_target(uninstall_${RTC_NAME} COMMAND
+ ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+
+
+# target settings for library/executable
+list(APPEND INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${INCLUDE_DIRS})
+
+link_directories(${LIBRARY_DIRS})
+
+add_definitions(${CFLAGS})
+
+foreach(idl ${IDL_FILES})
+ string(REGEX REPLACE "([^\\/]*)\\.idl" "\\1" idl_base ${idl})
+ add_custom_command(OUTPUT ${idl_base}Stub.cpp ${idl_base}Skel.cpp
+ COMMAND ${OPENRTM_IDL_WRAPPER} ${OPENRTM_IDL_WRAPPER_FLAGS} --idl-file=${idl}
+ COMMAND ${OPENRTM_IDLC} ${OPENRTM_IDLFLAGS} ${PROJECT_SOURCE_DIR}/${idl}
+ DEPENDS ${idl})
+endforeach()
+
+if(CMAKE_COMPILER_IS_GNUCC)
+ string(REPLACE ";" " " LDFLAGS "${LDFLAGS}")
+endif()
+
+add_library(${RTC_NAME} SHARED
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+target_link_libraries(${RTC_NAME} ${LIBRARIES})
+set_target_properties(${RTC_NAME} PROPERTIES PREFIX "")
+set_target_properties(${RTC_NAME} PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+if(UNIX)
+ add_library(${RTC_NAME}-static STATIC
+ ${LIBS_SRCS} ${IMPL_SRCS} ${SKEL_SRCS} ${STUB_SRCS})
+ target_link_libraries(${RTC_NAME}-static ${LIBRARIES})
+ set_target_properties(${RTC_NAME}-static PROPERTIES PREFIX "")
+ set_target_properties(${RTC_NAME}-static PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(UNIX)
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME}-static)
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME}-static ${LIBRARIES})
+
+ add_executable(${RTC_NAME}Comp-dynamic ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp-dynamic ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp-dynamic ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp-dynamic PROPERTIES LINK_FLAGS "${LDFLAGS}")
+
+else()
+ add_executable(${RTC_NAME}Comp ${EXEC_SRCS})
+ add_dependencies(${RTC_NAME}Comp ${RTC_NAME})
+ target_link_libraries(${RTC_NAME}Comp ${RTC_NAME} ${LIBRARIES})
+ set_target_properties(${RTC_NAME}Comp PROPERTIES LINK_FLAGS "${LDFLAGS}")
+endif()
+
+if(WIN32)
+ set (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}/Release/${RTC_NAME}.dll"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+ ADD_CUSTOM_COMMAND(
+ TARGET ${RTC_NAME}Comp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/${RTC_NAME}Comp/Release/${RTC_NAME}Comp.exe"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../bin"
+ )
+endif()
+
+install(TARGETS ${RTC_NAME} LIBRARY DESTINATION "${INSTALL_PREFIX}"
+ ARCHIVE DESTINATION "${INSTALL_PREFIX}"
+ RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+install(TARGETS ${RTC_NAME}Comp RUNTIME DESTINATION "${INSTALL_PREFIX}"
+ COMPONENT "applications")
+
+
+# target settings for document
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
+
+add_custom_target(doxygen_${RTC_NAME} COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+
+set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES)
+#set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES doc)
+
+#get_target_property(DOC_TARGET doc TYPE)
+#if(NOT DOC_TARGET)
+# add_custom_target(doc)
+#endif()
+#add_dependencies(doc doxygen)
+
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION "${INSTALL_PREFIX}"
+# COMPONENT "documents")
+
+
+# install source files
+install(FILES ${IDL_FILES} ${IMPL_SRCS} ${IMPL_INCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${LIBS_SRCS} ${LIBS_INCS} ${EXEC_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(FILES ${OTHER_SRCS}
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+install(DIRECTORY cmake_modules cpack_resources
+ DESTINATION "${INSTALL_PREFIX}/src"
+ COMPONENT "sources")
+
+
+# package settings
+set(CPACK_PACKAGE_NAME "${RTC_NAME}")
+set(CPACK_PACKAGE_VERSION_MAJOR "${RTC_VERSION_MAJOR}")
+set(CPACK_PACKAGE_VERSION_MINOR "${RTC_VERSION_MINOR}")
+set(CPACK_PACKAGE_VERSION_PATCH "${RTC_VERSION_PATCH}")
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+set(CPACK_PACKAGE_VENDOR "${RTC_VENDOR}")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${RTC_DESCRIPTION}")
+set(CPACK_PACKAGE_CONTACT "${RTC_MAINTAINER}")
+
+set(CPACK_RESOURCE_FILE_LICENSE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/License.txt")
+set(CPACK_PACKAGE_DESCRIPTION_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/Description.txt")
+
+set(CPACK_COMPONENTS_ALL applications documents sources)
+set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Applications")
+set(CPACK_COMPONENT_APPLICATIONS_DESCRIPTION "RT-Component applications")
+set(CPACK_COMPONENT_APPLICATIONS_DISABLED FALSE)
+
+set(CPACK_COMPONENT_DOCUMENTS_DISPLAY_NAME "Documents")
+set(CPACK_COMPONENT_DOCUMENTS_DESCRIPTION "RT-Component documents")
+set(CPACK_COMPONENT_DOCUMENTS_DISABLED TRUE)
+
+set(CPACK_COMPONENT_SOURCES_DISPLAY_NAME "Source files")
+set(CPACK_COMPONENT_SOURCES_DESCRIPTION "RT-Component source files")
+set(CPACK_COMPONENT_SOURCES_DISABLED TRUE)
+
+if(WIN32)
+ set(CPACK_GENERATOR "WIX")
+
+ # 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@/cpack_resources/License.rtf")
+ configure_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/cpack_resources/wix.xsl.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/wix.xsl" @ONLY)
+
+ set(CPACK_PACKAGE_FILE_NAME
+ "rtc${OPENRTM_VERSION}-${PACKAGE_NAME}${PACKAGE_VERSION}")
+
+else()
+ set(CPACK_GENERATOR "${LINUX_PACKAGE_GENERATOR}")
+
+ if(CPACK_GENERATOR STREQUAL "DEB")
+ # Linux Debian package settings
+
+ set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-1")
+ 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)
Deleted: trunk/ImageProcessing/opencv/components/Translate/cmake_modules/FindOpenCV.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Translate/cmake_modules/FindOpenCV.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Translate/cmake_modules/FindOpenCV.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,62 +0,0 @@
-
-
-set(OPENCV_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # OpenCV
- pkg_check_modules(OPENCV REQUIRED opencv)
- if(NOT OPENCV_DIR)
- if(OPENCV_FOUND)
- set(OPENCV_DIR ${OPENCV_PREFIX})
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- endif()
-
- set(OPENCV_CFLAGS ${OPENCV_CFLAGS_OTHER})
- set(OPENCV_LDFLAGS ${OPENCV_LDFLAGS_OTHER})
-
-endif(UNIX)
-
-if(WIN32)
- # OpenCV
- if(NOT OPENCV_DIR)
- if(NOT $ENV{OPENCV_ROOT} STREQUAL "")
- set(OPENCV_DIR $ENV{OPENCV_ROOT})
- set(OPENCV_FOUND TRUE)
- endif()
- set(OPENCV_DIR ${OPENCV_DIR} CACHE PATH "OpenCV root directory")
- if(NOT OPENCV_FOUND)
- message(FATAL_ERROR "OpenCV not found.")
- endif()
- endif()
-
- include(${OPENCV_DIR}/OpenCVConfig.cmake)
- set(OPENCV_VERSION ${OpenCV_VERSION})
- set(OPENCV_VERSION_MAJOR ${OpenCV_VERSION_MAJOR})
- set(OPENCV_VERSION_MINOR ${OpenCV_VERSION_MINOR})
- set(OPENCV_VERSION_PATCH ${OpenCV_VERSION_PATCH})
-
- set(OPENCV_INCLUDE_DIRS ${OPENCV_DIR}/include)
- set(OPENCV_LIBRARY_DIRS ${OPENCV_DIR}/lib)
-
- set(_ver "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
-
- foreach(_lib ${OPENCV_LIB_COMPONENTS})
- list(APPEND OPENCV_LIBRARIES optimized ${_lib}${_ver} debug ${_lib}${_ver}d)
- endforeach()
-
-endif(WIN32)
-
-message(STATUS "FindOpenCV setup done.")
-
-message(STATUS " OPENCV_DIR=" ${OPENCV_DIR})
-message(STATUS " OPENCV_VERSION=" ${OPENCV_VERSION})
-message(STATUS " OPENCV_CFLAGS=" ${OPENCV_CFLAGS})
-message(STATUS " OPENCV_INCLUDE_DIRS=" ${OPENCV_INCLUDE_DIRS})
-message(STATUS " OPENCV_LDFLAGS=" ${OPENCV_LDFLAGS})
-message(STATUS " OPENCV_LIBRARY_DIRS=" ${OPENCV_LIBRARY_DIRS})
-message(STATUS " OPENCV_LIBRARIES=" ${OPENCV_LIBRARIES})
-
Deleted: trunk/ImageProcessing/opencv/components/Translate/cmake_modules/FindOpenRTM.cmake
===================================================================
--- trunk/ImageProcessing/opencv/components/Translate/cmake_modules/FindOpenRTM.cmake 2011-10-25 12:42:04 UTC (rev 59)
+++ trunk/ImageProcessing/opencv/components/Translate/cmake_modules/FindOpenRTM.cmake 2011-10-27 14:42:50 UTC (rev 60)
@@ -1,185 +0,0 @@
-
-set(OMNIORB_FOUND FALSE)
-set(OPENRTM_FOUND FALSE)
-
-
-if(UNIX)
- include(FindPkgConfig)
-
- # omniORB
- pkg_check_modules(OMNIORB REQUIRED "omniORB4")
- if(NOT OMNIORB_DIR)
- if(OMNIORB_FOUND)
- set(OMNIORB_DIR "${OMNIORB_PREFIX}")
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- endif()
-
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS_OTHER})
- set(OMNIORB_LDFLAGS ${OMNIORB_LDFLAGS_OTHER})
-
- # OpenRTM-aist
- pkg_check_modules(OPENRTM REQUIRED "openrtm-aist")
- if(NOT OPENRTM_DIR)
- if(OPENRTM_FOUND)
- set(OPENRTM_DIR "${OPENRTM_PREFIX}")
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- endif()
-
- set(OPENRTM_CFLAGS ${OPENRTM_CFLAGS_OTHER})
- set(OPENRTM_LDFLAGS ${OPENRTM_LDFLAGS_OTHER})
-
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1"
- OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2"
- OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3"
- OPENRTM_VERSION_PATCH "${OPENRTM_VERSION}")
-
- # IDL Compiler
- set(OPENRTM_IDLC "")
- set(OPENRTM_IDLFLAGS "")
-
- execute_process(COMMAND rtm-config --idlc
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- set(OPENRTM_IDLC "${output_val}")
- endif()
-
- execute_process(COMMAND rtm-config --idlflags
- RESULT_VARIABLE result_val
- OUTPUT_VARIABLE output_val
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(result_val EQUAL 0)
- string(REPLACE " " ";" output_val ${output_val})
- set(OPENRTM_IDLFLAGS ${output_val} "-I${OPENRTM_DIR}/include/rtm/idl")
- endif()
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(UNIX)
-
-if(WIN32)
- # omniORB
- if(NOT OMNIORB_DIR)
- if(NOT $ENV{OMNI_ROOT} STREQUAL "")
- set(OMNIORB_DIR "$ENV{OMNI_ROOT}")
- set(OMNIORB_FOUND TRUE)
- endif()
- set(OMNIORB_DIR "${OMNIORB_DIR}" CACHE PATH "omniORB root directory")
- if(NOT OMNIORB_FOUND)
- message(FATAL_ERROR "omniORB not found.")
- endif()
- endif()
-
- set(OMNIORB_INCLUDE_DIRS "${OMNIORB_DIR}/include")
- set(OMNIORB_LIBRARY_DIRS "${OMNIORB_DIR}/lib/x86_win32")
-
- # omniORB version
- file(GLOB _vers RELATIVE "${OMNIORB_DIR}" "${OMNIORB_DIR}/THIS_IS_OMNIORB*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omniORB version file not found.")
- endif()
-
- set(OMNIORB_VERSION "${_vers}")
- string(REGEX REPLACE "THIS_IS_OMNIORB_" ""
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[_]" "."
- OMNIORB_VERSION "${OMNIORB_VERSION}")
- string(REGEX REPLACE "[.]" ""
- OMNIORB_VERSION_NUM "${OMNIORB_VERSION}")
-
- # omnithread version
- file(GLOB _vers RELATIVE "${OMNIORB_LIBRARY_DIRS}" "${OMNIORB_LIBRARY_DIRS}/omnithread*")
- if("${_vers}" STREQUAL "")
- message(FATAL_ERROR "omnithread not found.")
- endif()
- string(REGEX REPLACE ".*omnithread([0-9]+)_rt\\.lib.*" "\\1"
- OMNIORB_THREAD_NUM "${_vers}")
-
- set(OMNIORB_CFLAGS -D__WIN32__;-D__x86__;-D__NT__;-D__OSVERSION__=4;-D_CRT_SECURE_NO_DEPRECATE)
- if(${OMNIORB_VERSION_NUM} MATCHES "^40")
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0400)
- else()
- set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS};-D_WIN32_WINNT=0x0500;-DRTC_CORBA_CXXMAPPING11)
- endif()
-
- foreach(library "omniORB${OMNIORB_VERSION_NUM}_rt"
- "omniDynamic${OMNIORB_VERSION_NUM}_rt"
- "omnithread${OMNIORB_THREAD_NUM}_rt")
- list(APPEND OMNIORB_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
-
- # OpenRTM-aist
- if(NOT OPENRTM_DIR)
- if(NOT $ENV{RTM_ROOT} STREQUAL "")
- set(OPENRTM_DIR "$ENV{RTM_ROOT}")
- set(OPENRTM_FOUND TRUE)
- endif()
- set(OPENRTM_DIR "${OPENRTM_DIR}" CACHE PATH "OpenRTM-aist root directory")
- if(NOT OPENRTM_FOUND)
- message(FATAL_ERROR "OpenRTM-aist not found.")
- endif()
- endif()
-
- # OpenRTM-aist version
- set(OPENRTM_VERSION "${OPENRTM_DIR}")
- string(REGEX REPLACE ".*OpenRTM-aist/" "" OPENRTM_VERSION "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" OPENRTM_VERSION_MAJOR "${OPENRTM_VERSION}")
- string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" OPENRTM_VERSION_MINOR "${OPENRTM_VERSION}")
- set(OPENRTM_VERSION_PATCH "0")
- set(OPENRTM_VERSION "${OPENRTM_VERSION_MAJOR}.${OPENRTM_VERSION_MINOR}.${OPENRTM_VERSION_PATCH}")
-
- set(OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}")
- set(OPENRTM_LIBRARY_DIRS "${OPENRTM_DIR}/bin")
- list(APPEND OPENRTM_INCLUDE_DIRS "${OPENRTM_DIR}/rtm/idl")
-
- set(OPENRTM_CFLAGS "-DUSE_stub_in_nt_dll")
-
- foreach(library "RTC110" "coil110")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}d")
- endforeach()
- foreach(library "ws2_32" "mswsock")
- list(APPEND OPENRTM_LIBRARIES optimized "${library}" debug "${library}")
- endforeach()
-
- # IDL Compiler
- set(OPENRTM_IDLC "omniidl")
- set(OPENRTM_IDLFLAGS -bcxx -Wba -nf)
-
- # IDL Skelton Wrapper
- set(OPENRTM_IDL_WRAPPER "rtm-skelwrapper.py")
- set(OPENRTM_IDL_WRAPPER_FLAGS --include-dir="" --skel-suffix=Skel --stub-suffix=Stub)
-
-endif(WIN32)
-
-message(STATUS "FindOpenRTM setup done.")
-
-message(STATUS " OMNIORB_DIR=${OMNIORB_DIR}")
-message(STATUS " OMNIORB_VERSION=${OMNIORB_VERSION}")
-message(STATUS " OMNIORB_CFLAGS=${OMNIORB_CFLAGS}")
-message(STATUS " OMNIORB_INCLUDE_DIRS=${OMNIORB_INCLUDE_DIRS}")
-message(STATUS " OMNIORB_LDFLAGS=${OMNIORB_LDFLAGS}")
-message(STATUS " OMNIORB_LIBRARY_DIRS=${OMNIORB_LIBRARY_DIRS}")
-message(STATUS " OMNIORB_LIBRARIES=${OMNIORB_LIBRARIES}")
-
-message(STATUS " OPENRTM_DIR=${OPENRTM_DIR}")
-message(STATUS " OPENRTM_VERSION=${OPENRTM_VERSION}")
-message(STATUS " OPENRTM_VERSION_MAJOR=${OPENRTM_VERSION_MAJOR}")
-message(STATUS " OPENRTM_VERSION_MINOR=${OPENRTM_VERSION_MINOR}")
-message(STATUS " OPENRTM_VERSION_PATCH=${OPENRTM_VERSION_PATCH}")
-message(STATUS " OPENRTM_CFLAGS=${OPENRTM_CFLAGS}")
-message(STATUS " OPENRTM_INCLUDE_DIRS=${OPENRTM_INCLUDE_DIRS}")
-message(STATUS " OPENRTM_LDFLAGS=${OPENRTM_LDFLAGS}")
-message(STATUS " OPENRTM_LIBRARY_DIRS=${OPENRTM_LIBRARY_DIRS}")
-message(STATUS " OPENRTM_LIBRARIES=${OPENRTM_LIBRARIES}")
-
-message(STATUS " OPENRTM_IDLC=${OPENRTM_IDLC}")
-message(STATUS " OPENRTM_IDLFLAGS=${OPENRTM_IDLFLAGS}")
-message(STATUS " OPENRTM_IDL_WRAPPER=${OPENRTM_IDL_WRAPPER}")
-message(STATUS " OPENRTM_IDL_WRAPPER_FLAGS=${OPENRTM_IDL_WRAPPER_FLAGS}")
openrtm-commit メーリングリストの案内