[openrtm-commit:02795] r3035 - in trunk/OpenRTM-aist: . examples/Analyzer examples/AutoTest examples/Composite examples/ConfigSample examples/ExtTrigger examples/HelloWorld examples/SeqIO examples/SimpleIO examples/SimpleService examples/StringIO src/lib/coil src/lib/rtm utils/rtcd utils/rtcprof
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 9月 1日 (金) 20:01:17 JST
Author: miyamoto
Date: 2017-09-01 20:01:17 +0900 (Fri, 01 Sep 2017)
New Revision: 3035
Added:
trunk/OpenRTM-aist/convert_character_code.py
Modified:
trunk/OpenRTM-aist/CMakeLists.txt
trunk/OpenRTM-aist/examples/Analyzer/Analyzer_test.cpp
trunk/OpenRTM-aist/examples/Analyzer/CMakeLists.txt
trunk/OpenRTM-aist/examples/AutoTest/CMakeLists.txt
trunk/OpenRTM-aist/examples/Composite/CMakeLists.txt
trunk/OpenRTM-aist/examples/ConfigSample/CMakeLists.txt
trunk/OpenRTM-aist/examples/ExtTrigger/CMakeLists.txt
trunk/OpenRTM-aist/examples/HelloWorld/CMakeLists.txt
trunk/OpenRTM-aist/examples/SeqIO/CMakeLists.txt
trunk/OpenRTM-aist/examples/SimpleIO/CMakeLists.txt
trunk/OpenRTM-aist/examples/SimpleService/CMakeLists.txt
trunk/OpenRTM-aist/examples/StringIO/CMakeLists.txt
trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt
trunk/OpenRTM-aist/src/lib/coil/config_coil_cmake.h.in
trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt
trunk/OpenRTM-aist/src/lib/rtm/config_rtc_cmake.h.in
trunk/OpenRTM-aist/utils/rtcd/CMakeLists.txt
trunk/OpenRTM-aist/utils/rtcprof/CMakeLists.txt
Log:
[build, CMake] Support Windows.
Modified: trunk/OpenRTM-aist/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/CMakeLists.txt 2017-08-31 09:32:01 UTC (rev 3034)
+++ trunk/OpenRTM-aist/CMakeLists.txt 2017-09-01 11:01:17 UTC (rev 3035)
@@ -1,6 +1,12 @@
cmake_minimum_required (VERSION 2.6)
+project (OpenRTM_aist)
+
+
+
+
+
set(CORBA ${CORBA} CACHE STRING "set CORBA ")
if(NOT CORBA)
@@ -13,8 +19,13 @@
if(NOT ORB_ROOT)
+
if(CORBA MATCHES "omniORB")
- set(ORB_ROOT "/usr")
+ if(UNIX)
+ set(ORB_ROOT "/usr")
+ else(UNIX)
+ message(FATAL_ERROR "Please set ORB_ROOT.")
+ endif(UNIX)
else()
message(FATAL_ERROR "Please set ORB_ROOT.")
endif()
@@ -30,8 +41,10 @@
if(NOT IDL_COMPILE_COMMAND)
if(VXWORKS)
set(IDL_COMPILE_COMMAND ${ORB_ROOT}/build/bin/omniidl)
- else(VXWORKS)
+ elseif(UNIX)
set(IDL_COMPILE_COMMAND ${ORB_ROOT}/bin/omniidl)
+ elseif(MSVC)
+ set(IDL_COMPILE_COMMAND ${ORB_ROOT}/bin/x86_win32/omniidl)
endif(VXWORKS)
endif()
SET(IDLCOMMAND_FLAGS -bcxx -Wba -nf)
@@ -42,7 +55,7 @@
elseif(VXWORKS)
set(SKELWRAPPER_COMMAND ${CMAKE_SOURCE_DIR}/utils/rtm-skelwrapper/rtm-skelwrapper)
elseif(MSVC)
- set(SKELWRAPPER_COMMAND ${CMAKE_SOURCE_DIR}/utils/rtm-skelwrapper/rtm-skelwrapper.py)
+ set(SKELWRAPPER_COMMAND ${CMAKE_SOURCE_DIR}/utils/rtm-skelwrapper/rtm-skelwrapper)
endif()
@@ -117,23 +130,25 @@
else(RTP)
set(ORB_LINK_DIR ${ORB_ROOT}/lib/${CPU_TYPE}_vxWorks_kernel_${VXWORKS_MAJOR}.${VXWORKS_MINOR})
endif()
+ set(ORB_LIBRARIES omniDynamic4 omniORB4 omnithread)
elseif(UNIX)
SET (ORB_C_FLAGS_LIST
-D__x86__
)
set(ORB_LINK_DIR ${ORB_ROOT}/lib)
+ set(ORB_LIBRARIES omniDynamic4 omniORB4 omnithread)
elseif(MSVC)
SET (ORB_C_FLAGS_LIST
-D__WIN32__
-D__x86__
)
- set(ORB_LINK_DIR ${ORB_ROOT}/lib)
+ set(ORB_LINK_DIR ${ORB_ROOT}/lib/x86_win32)
+ set(ORB_LIBRARIES optimized;omniDynamic${OMNI_VERSION}${OMNI_MINOR}_rt;optimized;omniORB${OMNI_VERSION}${OMNI_MINOR}_rt;omnithread${OMNITHREAD_VERSION}_rt;debug;omniDynamic${OMNI_VERSION}${OMNI_MINOR}_rtd;debug;omniORB${OMNI_VERSION}${OMNI_MINOR}_rtd;debug;omnithread${OMNITHREAD_VERSION}_rtd)
endif(VXWORKS)
set(ORB_INCLUDE_DIR ${ORB_ROOT}/include)
- set(ORB_LIBRARIES omniDynamic4 omniORB4 omnithread)
ADD_DEFINITIONS(${ORB_C_FLAGS_LIST})
@@ -188,6 +203,8 @@
set(RTM_LINKER_OPTION -luuid -ldl -export-dynamic)
elseif(WIN32)
set(COIL_OS_DIR "win32")
+ set(RTM_LINKER_OPTION advapi32.lib;ws2_32.lib;mswsock.lib;rpcrt4.lib;optimized;msvcrt.lib;optimized;msvcmrt.lib;debug;msvcmrtd.lib;debug;msvcrtd.lib)
+ ADD_DEFINITIONS(-DLIBRARY_EXPORTS)
endif()
set(OPENRTM_NAME OpenRTM-aist-1.2.0 CACHE STRING "RTM name.")
@@ -230,6 +247,10 @@
endif()
+if(WIN32)
+ set(MAKE_DEF_COMMAND ${CMAKE_SOURCE_DIR}/build/makedeffile.py)
+endif(WIN32)
+
add_subdirectory(src)
add_subdirectory(examples)
add_subdirectory(utils)
Added: trunk/OpenRTM-aist/convert_character_code.py
===================================================================
--- trunk/OpenRTM-aist/convert_character_code.py (rev 0)
+++ trunk/OpenRTM-aist/convert_character_code.py 2017-09-01 11:01:17 UTC (rev 3035)
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+# -*- coding: euc-jp -*-
+
+import sys
+import chardet
+import glob
+import os.path
+import codecs
+
+
+
+if __name__ == '__main__':
+ args = sys.argv
+ dirpath = args[1]
+ target = args[2]
+ code = args[3]
+ ext_list = ["*.cpp",
+ "*.h"]
+
+ path_list = ["src/lib/rtm",
+ "src/lib/coil",
+ "src/lib/coil/common",
+ os.path.join("src/lib/coil", target, "coil"),
+ "examples/*",
+ "utils/*"]
+
+ #path_list = [os.path.join("src/lib/coil", target, "coil")]
+ for p in path_list:
+ for e in ext_list:
+ #print os.path.join(p, e)
+ #print glob.glob(os.path.join(dirpath, p, e))
+ filelist = glob.glob(os.path.join(dirpath, p, e))
+ for n in filelist:
+ with open(n, mode='rb') as f:
+ encoding = chardet.detect(f.read())["encoding"]
+ str_list = []
+ with codecs.open(n, "r", encoding) as f:
+ for row in f:
+ str_list.append(row)
+ with codecs.open(n, "w", code) as f:
+ for row in str_list:
+ f.write(row)
+
+
+
+
+
+
+
+
\ No newline at end of file
Modified: trunk/OpenRTM-aist/examples/Analyzer/Analyzer_test.cpp
===================================================================
--- trunk/OpenRTM-aist/examples/Analyzer/Analyzer_test.cpp 2017-08-31 09:32:01 UTC (rev 3034)
+++ trunk/OpenRTM-aist/examples/Analyzer/Analyzer_test.cpp 2017-09-01 11:01:17 UTC (rev 3035)
@@ -143,7 +143,7 @@
coil::TimeValue end(coil::gettimeofday());
double diff = (double)(end - start);
//std::cout << "Analyzer_test: " << m_sleep_time - diff << std::endl;
- if(diff < m_sleep_time)
+ if (diff < m_sleep_time)
{
coil::sleep(coil::TimeValue(m_sleep_time - diff));
}
Modified: trunk/OpenRTM-aist/examples/Analyzer/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/Analyzer/CMakeLists.txt 2017-08-31 09:32:01 UTC (rev 3034)
+++ trunk/OpenRTM-aist/examples/Analyzer/CMakeLists.txt 2017-09-01 11:01:17 UTC (rev 3035)
@@ -29,7 +29,11 @@
install(TARGETS ${target} RUNTIME DESTINATION examples)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
add_executable(${target}Comp ${standalone_srcs})
target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
@@ -41,7 +45,11 @@
set_target_properties(${target} PROPERTIES PREFIX "")
install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
- install(TARGETS ${target} LIBRARY DESTINATION examples)
+ if(WIN32)
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+ else(WIN32)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+ endif(WIN32)
endif()
@@ -71,7 +79,11 @@
install(TARGETS ${target} RUNTIME DESTINATION examples)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
add_executable(${target}Comp ${standalone_srcs})
target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
@@ -83,7 +95,11 @@
set_target_properties(${target} PROPERTIES PREFIX "")
install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
- install(TARGETS ${target} LIBRARY DESTINATION examples)
+ if(WIN32)
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+ else(WIN32)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+ endif(WIN32)
endif()
Modified: trunk/OpenRTM-aist/examples/AutoTest/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/AutoTest/CMakeLists.txt 2017-08-31 09:32:01 UTC (rev 3034)
+++ trunk/OpenRTM-aist/examples/AutoTest/CMakeLists.txt 2017-09-01 11:01:17 UTC (rev 3035)
@@ -51,7 +51,11 @@
install(TARGETS ${target} RUNTIME DESTINATION examples)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
add_executable(${target}Comp ${standalone_srcs})
target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
@@ -65,7 +69,11 @@
set_target_properties(${target} PROPERTIES PREFIX "")
install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
- install(TARGETS ${target} LIBRARY DESTINATION examples)
+ if(WIN32)
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+ else(WIN32)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+ endif(WIN32)
endif()
set_source_files_properties(${${idl_name}_SKEL} PROPERTIES GENERATED 1)
@@ -98,7 +106,11 @@
install(TARGETS ${target} RUNTIME DESTINATION examples)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
add_executable(${target}Comp ${standalone_srcs})
target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
@@ -112,7 +124,11 @@
set_target_properties(${target} PROPERTIES PREFIX "")
install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
- install(TARGETS ${target} LIBRARY DESTINATION examples)
+ if(WIN32)
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+ else(WIN32)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+ endif(WIN32)
endif()
set_source_files_properties(${${idl_name}_STUB} PROPERTIES GENERATED 1)
Modified: trunk/OpenRTM-aist/examples/Composite/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/Composite/CMakeLists.txt 2017-08-31 09:32:01 UTC (rev 3034)
+++ trunk/OpenRTM-aist/examples/Composite/CMakeLists.txt 2017-09-01 11:01:17 UTC (rev 3035)
@@ -57,7 +57,11 @@
install(TARGETS ${target} RUNTIME DESTINATION examples)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
add_executable(${target}Comp ${standalone_srcs})
target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
@@ -69,7 +73,11 @@
set_target_properties(${target} PROPERTIES PREFIX "")
install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
- install(TARGETS ${target} LIBRARY DESTINATION examples)
+ if(WIN32)
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+ else(WIN32)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+ endif(WIN32)
endif()
@@ -98,7 +106,11 @@
install(TARGETS ${target} RUNTIME DESTINATION examples)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
add_executable(${target}Comp ${standalone_srcs})
target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
@@ -110,7 +122,11 @@
set_target_properties(${target} PROPERTIES PREFIX "")
install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
- install(TARGETS ${target} LIBRARY DESTINATION examples)
+ if(WIN32)
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+ else(WIN32)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+ endif(WIN32)
endif()
@@ -139,7 +155,11 @@
install(TARGETS ${target} RUNTIME DESTINATION examples)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
add_executable(${target}Comp ${standalone_srcs})
target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
@@ -151,7 +171,11 @@
set_target_properties(${target} PROPERTIES PREFIX "")
install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
- install(TARGETS ${target} LIBRARY DESTINATION examples)
+ if(WIN32)
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+ else(WIN32)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+ endif(WIN32)
endif()
Modified: trunk/OpenRTM-aist/examples/ConfigSample/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/ConfigSample/CMakeLists.txt 2017-08-31 09:32:01 UTC (rev 3034)
+++ trunk/OpenRTM-aist/examples/ConfigSample/CMakeLists.txt 2017-09-01 11:01:17 UTC (rev 3035)
@@ -27,7 +27,12 @@
install(TARGETS ${target} RUNTIME DESTINATION examples)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
+ #message(STATUS ${libs})
add_executable(${target}Comp ${standalone_srcs})
target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
@@ -34,12 +39,17 @@
add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
add_library(${target} SHARED ${srcs})
+ #message(STATUS ${libs} ${RTM_LINKER_OPTION})
target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
add_dependencies(${target} ${RTM_PROJECT_NAME})
set_target_properties(${target} PROPERTIES PREFIX "")
install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
- install(TARGETS ${target} LIBRARY DESTINATION examples)
+ if(WIN32)
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+ else(WIN32)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+ endif(WIN32)
endif()
Modified: trunk/OpenRTM-aist/examples/ExtTrigger/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/ExtTrigger/CMakeLists.txt 2017-08-31 09:32:01 UTC (rev 3034)
+++ trunk/OpenRTM-aist/examples/ExtTrigger/CMakeLists.txt 2017-09-01 11:01:17 UTC (rev 3035)
@@ -27,7 +27,11 @@
install(TARGETS ${target} RUNTIME DESTINATION examples)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
add_executable(${target}Comp ${standalone_srcs})
target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
@@ -39,7 +43,11 @@
set_target_properties(${target} PROPERTIES PREFIX "")
install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
- install(TARGETS ${target} LIBRARY DESTINATION examples)
+ if(WIN32)
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+ else(WIN32)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+ endif(WIN32)
endif()
if(VXWORKS)
@@ -67,7 +75,11 @@
install(TARGETS ${target} RUNTIME DESTINATION examples)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
add_executable(${target}Comp ${standalone_srcs})
target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
@@ -79,7 +91,11 @@
set_target_properties(${target} PROPERTIES PREFIX "")
install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
- install(TARGETS ${target} LIBRARY DESTINATION examples)
+ if(WIN32)
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+ else(WIN32)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+ endif(WIN32)
endif()
@@ -103,7 +119,11 @@
if(VXWORKS AND NOT RTP)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
add_executable(${target} ${srcs})
target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
Modified: trunk/OpenRTM-aist/examples/HelloWorld/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/HelloWorld/CMakeLists.txt 2017-08-31 09:32:01 UTC (rev 3034)
+++ trunk/OpenRTM-aist/examples/HelloWorld/CMakeLists.txt 2017-09-01 11:01:17 UTC (rev 3035)
@@ -27,7 +27,11 @@
install(TARGETS ${target} RUNTIME DESTINATION examples)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
add_executable(${target}Comp ${standalone_srcs})
target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
@@ -39,7 +43,11 @@
set_target_properties(${target} PROPERTIES PREFIX "")
install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
- install(TARGETS ${target} LIBRARY DESTINATION examples)
+ if(WIN32)
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+ else(WIN32)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+ endif(WIN32)
endif()
Modified: trunk/OpenRTM-aist/examples/SeqIO/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/SeqIO/CMakeLists.txt 2017-08-31 09:32:01 UTC (rev 3034)
+++ trunk/OpenRTM-aist/examples/SeqIO/CMakeLists.txt 2017-09-01 11:01:17 UTC (rev 3035)
@@ -29,21 +29,27 @@
install(TARGETS ${target} RUNTIME DESTINATION examples)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
add_executable(${target}Comp ${standalone_srcs})
target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
add_dependencies(${target}Comp ${RTM_PROJECT_NAME})
- add_dependencies(${target}Comp ${idl_name}_TGT)
add_library(${target} SHARED ${srcs})
target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
add_dependencies(${target} ${RTM_PROJECT_NAME})
- add_dependencies(${target} ${idl_name}_TGT)
set_target_properties(${target} PROPERTIES PREFIX "")
install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
- install(TARGETS ${target} LIBRARY DESTINATION examples)
+ if(WIN32)
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+ else(WIN32)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+ endif(WIN32)
endif()
if(VXWORKS)
@@ -72,7 +78,11 @@
install(TARGETS ${target} RUNTIME DESTINATION examples)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
add_executable(${target}Comp ${standalone_srcs})
target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
@@ -84,7 +94,11 @@
set_target_properties(${target} PROPERTIES PREFIX "")
install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
- install(TARGETS ${target} LIBRARY DESTINATION examples)
+ if(WIN32)
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+ else(WIN32)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+ endif(WIN32)
endif()
Modified: trunk/OpenRTM-aist/examples/SimpleIO/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/SimpleIO/CMakeLists.txt 2017-08-31 09:32:01 UTC (rev 3034)
+++ trunk/OpenRTM-aist/examples/SimpleIO/CMakeLists.txt 2017-09-01 11:01:17 UTC (rev 3035)
@@ -27,7 +27,11 @@
install(TARGETS ${target} RUNTIME DESTINATION examples)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
add_executable(${target}Comp ${standalone_srcs})
target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
@@ -39,7 +43,11 @@
set_target_properties(${target} PROPERTIES PREFIX "")
install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
- install(TARGETS ${target} LIBRARY DESTINATION examples)
+ if(WIN32)
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+ else(WIN32)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+ endif(WIN32)
endif()
if(VXWORKS)
@@ -69,7 +77,11 @@
install(TARGETS ${target} RUNTIME DESTINATION examples)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
add_executable(${target}Comp ${standalone_srcs})
target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
@@ -81,7 +93,11 @@
set_target_properties(${target} PROPERTIES PREFIX "")
install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
- install(TARGETS ${target} LIBRARY DESTINATION examples)
+ if(WIN32)
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+ else(WIN32)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+ endif(WIN32)
endif()
Modified: trunk/OpenRTM-aist/examples/SimpleService/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/SimpleService/CMakeLists.txt 2017-08-31 09:32:01 UTC (rev 3034)
+++ trunk/OpenRTM-aist/examples/SimpleService/CMakeLists.txt 2017-09-01 11:01:17 UTC (rev 3035)
@@ -52,7 +52,11 @@
install(TARGETS ${target} RUNTIME DESTINATION examples)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
add_executable(${target}Comp ${standalone_srcs})
target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
@@ -66,7 +70,11 @@
set_target_properties(${target} PROPERTIES PREFIX "")
install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
- install(TARGETS ${target} LIBRARY DESTINATION examples)
+ if(WIN32)
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+ else(WIN32)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+ endif(WIN32)
endif()
@@ -104,7 +112,11 @@
install(TARGETS ${target} RUNTIME DESTINATION examples)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
add_executable(${target}Comp ${standalone_srcs})
target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
@@ -118,7 +130,11 @@
set_target_properties(${target} PROPERTIES PREFIX "")
install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
- install(TARGETS ${target} LIBRARY DESTINATION examples)
+ if(WIN32)
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+ else(WIN32)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+ endif(WIN32)
endif()
set_source_files_properties(${${idl_name}_SKEL} PROPERTIES GENERATED 1)
Modified: trunk/OpenRTM-aist/examples/StringIO/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/examples/StringIO/CMakeLists.txt 2017-08-31 09:32:01 UTC (rev 3034)
+++ trunk/OpenRTM-aist/examples/StringIO/CMakeLists.txt 2017-09-01 11:01:17 UTC (rev 3035)
@@ -27,7 +27,11 @@
install(TARGETS ${target} RUNTIME DESTINATION examples)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
add_executable(${target}Comp ${standalone_srcs})
target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
@@ -39,7 +43,11 @@
set_target_properties(${target} PROPERTIES PREFIX "")
install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
- install(TARGETS ${target} LIBRARY DESTINATION examples)
+ if(WIN32)
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+ else(WIN32)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+ endif(WIN32)
endif()
@@ -68,7 +76,11 @@
install(TARGETS ${target} RUNTIME DESTINATION examples)
else()
- set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+ else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+ endif(VXWORKS)
add_executable(${target}Comp ${standalone_srcs})
target_link_libraries(${target}Comp ${libs} ${RTM_LINKER_OPTION})
@@ -80,7 +92,11 @@
set_target_properties(${target} PROPERTIES PREFIX "")
install(TARGETS ${target}Comp RUNTIME DESTINATION examples)
- install(TARGETS ${target} LIBRARY DESTINATION examples)
+ if(WIN32)
+ install(TARGETS ${target} RUNTIME DESTINATION examples)
+ else(WIN32)
+ install(TARGETS ${target} LIBRARY DESTINATION examples)
+ endif(WIN32)
endif()
if(VXWORKS)
if(RTP)
Modified: trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt 2017-08-31 09:32:01 UTC (rev 3034)
+++ trunk/OpenRTM-aist/src/lib/coil/CMakeLists.txt 2017-09-01 11:01:17 UTC (rev 3035)
@@ -16,6 +16,7 @@
option (COIL_OS_QNX "OS is QNX" OFF)
option (COIL_OS_SUNOS "OS is SunOS" OFF)
option (COIL_OS_VXWORKS "OS is VxWorks" OFF)
+option (COIL_OS_WIN32 "OS is Windows" OFF)
option (HAVE_DLFCN_H "Define to 1 if you have the <dlfcn.h> header file." ON)
option (HAVE_INTTYPES_H "Define to 1 if you have the <inttypes.h> header file." ON)
option (HAVE_MEMORY_H "Define to 1 if you have the <memory.h> header file." ON)
@@ -54,6 +55,7 @@
elseif(UNIX)
set (COIL_OS_LINUX ON)
elseif(WIN32)
+ set (COIL_OS_WIN32 ON)
endif()
@@ -78,7 +80,6 @@
common/coil/Timer.h
common/coil/crc.h
common/coil/stringutil.h
- ${COIL_OS_DIR}/coil/Affinity.h
${COIL_OS_DIR}/coil/Condition.h
${COIL_OS_DIR}/coil/DynamicLib.h
${COIL_OS_DIR}/coil/Mutex.h
@@ -104,7 +105,6 @@
common/coil/Timer.cpp
common/coil/crc.cpp
common/coil/stringutil.cpp
- ${COIL_OS_DIR}/coil/Affinity.cpp
${COIL_OS_DIR}/coil/Condition.cpp
${COIL_OS_DIR}/coil/DynamicLib.cpp
${COIL_OS_DIR}/coil/Mutex.cpp
@@ -119,7 +119,37 @@
)
+if(WIN32)
+ if(CMAKE_BUILD_TYPE MATCHES RELEASE)
+ set(DEF_FILE_NAME ${COIL_PROJECT_NAME}.def)
+ else()
+ set(DEF_FILE_NAME ${COIL_PROJECT_NAME}d.def)
+ endif()
+ add_library(${COIL_PROJECT_NAME}_static STATIC ${coil_srcs})
+ get_property(coil_static_location TARGET ${COIL_PROJECT_NAME}_static PROPERTY LOCATION)
+ add_custom_command(OUTPUT ${DEF_FILE_NAME}
+ COMMAND python ${MAKE_DEF_COMMAND} ${coil_static_location} ${COIL_PROJECT_NAME} ${RTM_SHORT_VERSION} ${DEF_FILE_NAME}
+
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ )
+ add_custom_target(${COIL_PROJECT_NAME}_TGT DEPENDS ${DEF_FILE_NAME})
+ add_dependencies(${COIL_PROJECT_NAME}_TGT ${COIL_PROJECT_NAME}_static)
+ set(coil_srcs ${coil_srcs} ${CMAKE_CURRENT_BINARY_DIR}/${DEF_FILE_NAME})
+# add_custom_command(OUTPUT ${COIL_PROJECT_NAME}.def
+# COMMAND lib -out:"coil_static.lib" "$(IntDir)Skel*.obj"
+# COMMAND python ${MAKE_DEF_COMMAND} coil_static.lib ${COIL_PROJECT_NAME} ${RTM_SHORT_VERSION} ${COIL_PROJECT_NAME}.def
+# PRE_LINK
+# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+# DEPENDS ${COIL_PROJECT_NAME}
+# )
+# set(coil_srcs ${coil_srcs} ${CMAKE_CURRENT_BINARY_DIR}/${COIL_PROJECT_NAME}.def)
+
+else(WIN32)
+ set(coil_srcs ${coil_srcs} ${COIL_OS_DIR}/coil/Affinity.cpp)
+ set(coil_headers ${coil_headers} ${COIL_OS_DIR}/coil/Affinity.h)
+endif()
+
include_directories(
${PROJECT_SOURCE_DIR}/common
${PROJECT_SOURCE_DIR}/${COIL_OS_DIR}
@@ -132,8 +162,15 @@
install(TARGETS ${COIL_PROJECT_NAME} ARCHIVE DESTINATION lib)
else(VXWORKS)
add_library(${COIL_PROJECT_NAME} SHARED ${coil_srcs} )
+ set_target_properties(${COIL_PROJECT_NAME} PROPERTIES DEBUG_POSTFIX d)
target_link_libraries(${COIL_PROJECT_NAME} ${RTM_LINKER_OPTION})
- install(TARGETS ${COIL_PROJECT_NAME} LIBRARY DESTINATION lib)
+ if(UNIX)
+ install(TARGETS ${COIL_PROJECT_NAME} LIBRARY DESTINATION lib)
+ elseif(WIN32)
+ set_source_files_properties(${DEF_FILE_NAME} PROPERTIES GENERATED 1)
+ add_dependencies(${COIL_PROJECT_NAME} ${COIL_PROJECT_NAME}_TGT)
+ install(TARGETS ${COIL_PROJECT_NAME} RUNTIME DESTINATION bin)
+ endif()
endif(VXWORKS)
install(FILES ${coil_headers} DESTINATION include/coil)
#add_executable(coil ${coil_srcs} )
Modified: trunk/OpenRTM-aist/src/lib/coil/config_coil_cmake.h.in
===================================================================
--- trunk/OpenRTM-aist/src/lib/coil/config_coil_cmake.h.in 2017-08-31 09:32:01 UTC (rev 3034)
+++ trunk/OpenRTM-aist/src/lib/coil/config_coil_cmake.h.in 2017-09-01 11:01:17 UTC (rev 3035)
@@ -34,9 +34,12 @@
/* OS is SunOS */
#cmakedefine COIL_OS_SUNOS TRUE
-/* OS is VxWorks */
+/* OS is Windows */
#cmakedefine COIL_OS_VXWORKS TRUE
+/* OS is VxWorks */
+#cmakedefine COIL_OS_WIN32 TRUE
+
/* coil platform is ACE */
#define COIL_PLATFORM @COIL_PLATFORM@
Modified: trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt 2017-08-31 09:32:01 UTC (rev 3034)
+++ trunk/OpenRTM-aist/src/lib/rtm/CMakeLists.txt 2017-09-01 11:01:17 UTC (rev 3035)
@@ -52,6 +52,7 @@
option (RTM_OS_OSF1 "OS is OSF1" OFF)
option (RTM_OS_QNX "OS is QNX" OFF)
option (RTM_OS_SUNOS "OS is SunOS" OFF)
+option (RTM_OS_WIN32 "OS is Windows" OFF)
option (RTM_RTDSC "RDTSC is enable" OFF)
option (WITH_DMALLOC "Define if using the dmalloc debugging malloc package" OFF)
option (_REENTRANT "Multi Thread Support" ON)
@@ -72,6 +73,7 @@
elseif(WIN32)
set (STDC_HEADERS OFF)
set (OSVERSION OFF)
+ set (RTM_OS_WIN32 ON)
endif()
@@ -114,6 +116,21 @@
+
+
+
+
+
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config_rtc_cmake.h.in ${PROJECT_BINARY_DIR}/config_rtc.h)
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version_cmake.h.in ${PROJECT_BINARY_DIR}/version.h)
+
+
+
+
+
+
if(VXWORKS)
else(VXWORKS)
link_directories(${ORB_LINK_DIR})
@@ -122,11 +139,6 @@
include_directories(${ORB_INCLUDE_DIR})
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config_rtc_cmake.h.in ${PROJECT_BINARY_DIR}/config_rtc.h)
-
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version_cmake.h.in ${PROJECT_BINARY_DIR}/version.h)
-
-
set(RTM_INCLUDE_DIR ${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/lib/coil/common
${PROJECT_BINARY_DIR}/idl
@@ -143,6 +155,10 @@
set(RTM_INCLUDE_DIR ${RTM_INCLUDE_DIR} PARENT_SCOPE)
+
+add_subdirectory(idl)
+
+
set(rtm_headers
ConfigAdmin.h
ModuleManager.h
@@ -312,13 +328,60 @@
#add_library(rtm STATIC ${rtm_srcs} ${ALL_IDL_SRCS} )
+
+if(WIN32)
+ if(CMAKE_BUILD_TYPE MATCHES RELEASE)
+ set(DEF_FILE_NAME ${RTM_PROJECT_NAME}.def)
+ else()
+ set(DEF_FILE_NAME ${RTM_PROJECT_NAME}d.def)
+ endif()
+ #ADD_DEFINITIONS(-DLIBRARY_EXPORTS)
+ #add_library(${RTM_PROJECT_NAME}_static STATIC ${rtm_srcs} ${ALL_IDL_SRCS_RTM})
+ add_library(${RTM_PROJECT_NAME}_static STATIC ${rtm_srcs} )
+ add_dependencies(${RTM_PROJECT_NAME}_static ${RTCSKEL_PROJECT_NAME})
+ set_source_files_properties(${ALL_IDL_SRCS_RTM} PROPERTIES GENERATED 1)
+ get_property(rtm_static_location TARGET ${RTM_PROJECT_NAME}_static PROPERTY LOCATION)
+ #message(STATUS ${rtm_static_location})
+ add_custom_command(OUTPUT ${DEF_FILE_NAME}
+ COMMAND python ${MAKE_DEF_COMMAND} ${rtm_static_location} ${RTM_PROJECT_NAME} ${RTM_SHORT_VERSION} ${DEF_FILE_NAME}
+
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ )
+ add_custom_target(${RTM_PROJECT_NAME}_TGT DEPENDS ${DEF_FILE_NAME})
+ add_dependencies(${RTM_PROJECT_NAME}_TGT ${RTM_PROJECT_NAME}_static)
+ set(rtm_srcs ${rtm_srcs} ${CMAKE_CURRENT_BINARY_DIR}/${DEF_FILE_NAME})
+
+ #get_property(rtcskel_location TARGET RTCSkel PROPERTY LOCATION)
+ #add_custom_command(OUTPUT RTCSkel.def
+ # COMMAND python ${MAKE_DEF_COMMAND} ${rtcskel_location} RTCSkel ${RTM_SHORT_VERSION} RTCSkel.def
+ # WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ #)
+
+# add_custom_command(OUTPUT ${RTM_PROJECT_NAME}.def
+# COMMAND lib -out:"rtm_static.lib" "$(IntDir)*.obj" "idl\\RTCSkel.dir\\Release\\*.obj"
+# COMMAND python ${MAKE_DEF_COMMAND} rtm_static.lib ${RTM_PROJECT_NAME} ${RTM_SHORT_VERSION} ${RTM_PROJECT_NAME}.def
+# PRE_LINK
+# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+# DEPENDS ${RTM_PROJECT_NAME}
+# )
+# set(rtm_srcs ${rtm_srcs} ${CMAKE_CURRENT_BINARY_DIR}/${RTM_PROJECT_NAME}.def)
+endif(WIN32)
+
+
if(VXWORKS)
add_library(${RTM_PROJECT_NAME} STATIC ${rtm_srcs})
install(TARGETS ${RTM_PROJECT_NAME} ARCHIVE DESTINATION lib)
else(VXWORKS)
add_library(${RTM_PROJECT_NAME} SHARED ${rtm_srcs})
+ set_target_properties(${RTM_PROJECT_NAME} PROPERTIES DEBUG_POSTFIX d)
target_link_libraries(${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME} ${RTM_LINKER_OPTION})
- install(TARGETS ${RTM_PROJECT_NAME} LIBRARY DESTINATION lib)
+ if(UNIX)
+ install(TARGETS ${RTM_PROJECT_NAME} LIBRARY DESTINATION lib)
+ elseif(WIN32)
+ set_source_files_properties(${DEF_FILE_NAME} PROPERTIES GENERATED 1)
+ add_dependencies(${RTM_PROJECT_NAME} ${RTM_PROJECT_NAME}_TGT)
+ install(TARGETS ${RTM_PROJECT_NAME} RUNTIME DESTINATION bin)
+ endif()
endif(VXWORKS)
install(FILES ${rtm_headers} DESTINATION include/rtm)
@@ -330,7 +393,7 @@
-add_subdirectory(idl)
+
add_dependencies(${RTM_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
Modified: trunk/OpenRTM-aist/src/lib/rtm/config_rtc_cmake.h.in
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/config_rtc_cmake.h.in 2017-08-31 09:32:01 UTC (rev 3034)
+++ trunk/OpenRTM-aist/src/lib/rtm/config_rtc_cmake.h.in 2017-09-01 11:01:17 UTC (rev 3035)
@@ -143,6 +143,9 @@
/* OS is SunOS */
#cmakedefine RTM_OS_SUNOS TRUE
+/* OS is Windows */
+#cmakedefine RTM_OS_WIN32 TRUE
+
/* OS version */
#cmakedefine __OSVERSION__ @OSVERSION_VALUE@
Modified: trunk/OpenRTM-aist/utils/rtcd/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/utils/rtcd/CMakeLists.txt 2017-08-31 09:32:01 UTC (rev 3034)
+++ trunk/OpenRTM-aist/utils/rtcd/CMakeLists.txt 2017-09-01 11:01:17 UTC (rev 3035)
@@ -22,7 +22,15 @@
add_dependencies(${target} ${RTM_PROJECT_NAME})
-target_link_libraries(${target} ${RTM_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME} ${COIL_PROJECT_NAME} ${ORB_LIBRARIES} ${RTM_LINKER_OPTION})
+
+if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+endif(VXWORKS)
+
+target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
+
#target_link_libraries(${target} ${ORB_LIBRARIES})
Modified: trunk/OpenRTM-aist/utils/rtcprof/CMakeLists.txt
===================================================================
--- trunk/OpenRTM-aist/utils/rtcprof/CMakeLists.txt 2017-08-31 09:32:01 UTC (rev 3034)
+++ trunk/OpenRTM-aist/utils/rtcprof/CMakeLists.txt 2017-09-01 11:01:17 UTC (rev 3035)
@@ -29,8 +29,13 @@
# endif(RTP)
#endif(VXWORKS)
-set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+if(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME} ${RTCSKEL_PROJECT_NAME})
+else(VXWORKS)
+ set(libs ${RTM_PROJECT_NAME} ${ORB_LIBRARIES} ${COIL_PROJECT_NAME})
+endif(VXWORKS)
+
add_executable(${target} ${srcs})
target_link_libraries(${target} ${libs} ${RTM_LINKER_OPTION})
add_dependencies(${target} ${RTM_PROJECT_NAME})
More information about the openrtm-commit
mailing list