Skip to content

Commit

Permalink
[CMakeLists.txt] Specify include_directories as higher priority to pa…
Browse files Browse the repository at this point in the history
…ss QNX build.
  • Loading branch information
snozawa committed Apr 8, 2016
1 parent 93ea359 commit 71f3d02
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,10 @@ elseif(WIN32)
set(SH_SFX "bat")
endif()

# OpenRTM-aist(>= 1.0.0)
find_package(OpenRTM REQUIRED)
if(EXISTS "${OPENRTM_DIR}/include/openrtm-1.1/rtm/RTObjectStateMachine.h")
add_definitions(-DOPENRTM_VERSION_TRUNK)
endif()

# OpenHRP
find_package(OpenHRP REQUIRED)
include_directories(${OPENHRP_INCLUDE_DIRS})
link_directories(${OPENHRP_LIBRARY_DIRS})
if(UNIX)
add_definitions(${OPENHRP_DEFINITIONS})
endif()

# Specify include directory.
# After https://github.com/fkanehiro/hrpsys-base/pull/842, hrpsys-base local include files are used as "hrpsys/xx/yy.h".
# For this reason, we make ${CMAKE_BINARY_DIR}/hrpsys directory and generate symbolic link for related include files under it.
# To deal with include files in ${CMAKE_BINARY_DIR}/hrpsys as hrpsys-base local include files, we set cmake's include_directories before other include_directories setting to set higher priority for ${CMAKE_BINARY_DIR}/hrpsys.
execute_process(
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/hrpsys
)
Expand All @@ -67,6 +57,20 @@ if (NOT EXISTS ${CMAKE_BINARY_DIR}/hrpsys/idl)
endif()
include_directories(${CMAKE_BINARY_DIR})

# OpenRTM-aist(>= 1.0.0)
find_package(OpenRTM REQUIRED)
if(EXISTS "${OPENRTM_DIR}/include/openrtm-1.1/rtm/RTObjectStateMachine.h")
add_definitions(-DOPENRTM_VERSION_TRUNK)
endif()

# OpenHRP
find_package(OpenHRP REQUIRED)
include_directories(${OPENHRP_INCLUDE_DIRS})
link_directories(${OPENHRP_LIBRARY_DIRS})
if(UNIX)
add_definitions(${OPENHRP_DEFINITIONS})
endif()

if(ENABLE_INSTALL_RPATH)
set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib:$ORIGIN/../../../lib:${OPENHRP_LIBRARY_DIRS}")
endif()
Expand Down

0 comments on commit 71f3d02

Please sign in to comment.