[openrtm-commit:02676] r744 - trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake

openrtm @ openrtm.org openrtm @ openrtm.org
2017年 7月 13日 (木) 10:57:53 JST


Author: ga
Date: 2017-07-13 10:57:53 +0900 (Thu, 13 Jul 2017)
New Revision: 744

Modified:
   trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/CMakeLists.txt.vsl
Log:
Modified CMakeLists.txt #4132

Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/CMakeLists.txt.vsl
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/CMakeLists.txt.vsl	2017-06-20 07:31:57 UTC (rev 743)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/CMakeLists.txt.vsl	2017-07-13 01:57:53 UTC (rev 744)
@@ -18,16 +18,9 @@
 set(PROJECT_MAINTAINER "unknown")
 set(PROJECT_TYPE "c++/${rtcParam.category}")
 
-if(WIN32)
-    string(REPLACE "\\" "/" OPENRTM_DIR "${dol}ENV{RTM_ROOT}")
-    string(LENGTH ${dol}{OPENRTM_DIR} RTM_ROOT_LEN)
-    string(REPLACE "\\" "/" RTM_BASE "${dol}ENV{RTM_BASE}")
-    string(LENGTH ${dol}{RTM_BASE} RTM_BASE_LEN)
-    string(SUBSTRING ${dol}{OPENRTM_DIR} ${dol}{RTM_BASE_LEN} ${dol}{RTM_ROOT_LEN} RTM_VER)
-    string(REGEX REPLACE "/${dol}" "" RTM_VER "${dol}{RTM_VER}")
-    set(RTM_SHORT_VER ${dol}{RTM_VER})
-    string(REPLACE "." "" RTM_SHORT_VER "${dol}{RTM_SHORT_VER}")
-endif()
+find_package(OpenRTM)
+set(RTM_VER ${dol}{OPENRTM_VERSION})
+set(RTM_SHORT_VER ${dol}{OPENRTM_VERSION_MAJOR}${dol}{OPENRTM_VERSION_MINOR}${dol}{OPENRTM_VERSION_PATCH})
 
 function(get_dist ARG0)
  if(NOT ${dol}{CMAKE_SYSTEM_NAME} MATCHES "Linux")
@@ -115,7 +108,7 @@
       set(CMAKE_INSTALL_PREFIX "${dol}{OPENRTM_DIR}Components/${dol}{PROJECT_TYPE}/${dol}{PROJECT_NAME}" CACHE PATH "..." FORCE)
    endif()
 else(WIN32)
-   set(OPENRTM_SHARE_PREFIX "share/openrtm-${dol}{PROJECT_VERSION_MAJOR}.${dol}{PROJECT_VERSION_MINOR}")
+   set(OPENRTM_SHARE_PREFIX "share/openrtm-${dol}{OPENRTM_VERSION_MAJOR}.${dol}{OPENRTM_VERSION_MINOR}")
    set(INSTALL_PREFIX "${dol}{OPENRTM_SHARE_PREFIX}/components/${dol}{PROJECT_TYPE}/${dol}{PROJECT_NAME}")
 endif(WIN32)
        



More information about the openrtm-commit mailing list