diff --git a/CMakeLists.txt b/CMakeLists.txt index 2320bd227..f022e6e9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -268,6 +268,9 @@ set(OMNIORB_CFLAGS ${OMNIORB_CFLAGS} CACHE STRING "Compile flags for omniORB") # OpenRTM-aist find_package(OpenRTM REQUIRED) +if(EXISTS "${OPENRTM_DIR}/include/openrtm-1.1/rtm/RTObjectStateMachine.h") +add_definitions(-DOPENRTM_VERSION_TRUNK) +endif() set(ADDITIONAL_SYMBOL "") include_directories(${OPENRTM_INCLUDE_DIRS}) link_directories(${OPENRTM_LIBRARY_DIRS}) diff --git a/hrplib/hrpRTM/SimulationExecutionContext.cpp b/hrplib/hrpRTM/SimulationExecutionContext.cpp index 6aaf84594..3a45b72e6 100644 --- a/hrplib/hrpRTM/SimulationExecutionContext.cpp +++ b/hrplib/hrpRTM/SimulationExecutionContext.cpp @@ -1,5 +1,5 @@ #include -#if !defined(OPENRTM_VERSION042) && !defined(OPENRTM_VERSION110) +#if (!defined(OPENRTM_VERSION042) && !defined(OPENRTM_VERSION110)) || defined(OPENRTM_VERSION_TRUNK) #include #endif #include "SimulationExecutionContext.h" @@ -21,7 +21,7 @@ namespace RTC ReturnCode_t SimulationExecutionContext::stop() throw (CORBA::SystemException) { -#if defined(OPENRTM_VERSION042) || defined(OPENRTM_VERSION110) +#if (defined(OPENRTM_VERSION042) || defined(OPENRTM_VERSION110)) && !defined(OPENRTM_VERSION_TRUNK) if (!m_running) return RTC::PRECONDITION_NOT_MET; OpenRTM::ExtTrigExecutionContextService_var extTrigExecContext =