From ec0e725e21e992028265c5505d684eefc61761c1 Mon Sep 17 00:00:00 2001 From: Stephen Roderick Date: Tue, 5 Jan 2010 10:47:09 +1300 Subject: [PATCH] cmake: Cope with path change behaviour in CMake 2.8 --- src/CMakeLists.txt | 4 ++-- src/bindings/rtt/CMakeLists.txt | 9 +++++---- src/bindings/rtt/corba/CMakeLists.txt | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2322c72..560b4f4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -17,8 +17,8 @@ INSTALL_FILES( /include/kdl FILES ${KDL_HPPS}) INSTALL_FILES( /include/kdl/utilities FILES ${UTIL_HPPS}) # Orocos convention: -CONFIGURE_FILE( kdl.pc.in src/orocos-kdl.pc @ONLY) -INSTALL_FILES( /lib/pkgconfig FILES orocos-kdl.pc) +CONFIGURE_FILE( kdl.pc.in ${CMAKE_CURRENT_BINARY_DIR}/orocos-kdl.pc @ONLY) +INSTALL_FILES( /lib/pkgconfig FILES ${CMAKE_CURRENT_BINARY_DIR}/orocos-kdl.pc) IF( OROCOS_PLUGIN ) ADD_SUBDIRECTORY( bindings/rtt ) diff --git a/src/bindings/rtt/CMakeLists.txt b/src/bindings/rtt/CMakeLists.txt index 94610e7..323865d 100644 --- a/src/bindings/rtt/CMakeLists.txt +++ b/src/bindings/rtt/CMakeLists.txt @@ -13,14 +13,15 @@ IF( OROCOS_PLUGIN ) # SET(ROTATION_PROPERTIES_EULER 1) # ENDIF(${ROTATION_PROPERTIES} STREQUAL "EULER") - CONFIGURE_FILE( kdltk.hpp.in src/bindings/rtt/kdltk.hpp) - INSTALL_FILES( /include/kdl/bindings/rtt FILES kdltk.hpp) + CONFIGURE_FILE( kdltk.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/kdltk.hpp) + INSTALL_FILES( /include/kdl/bindings/rtt FILES ${CMAKE_CURRENT_BINARY_DIR}/kdltk.hpp) INCLUDE_DIRECTORIES(${PROJ_SOURCE_DIR}/src) FILE( GLOB SRCS [^.]*.cpp [^.]*.cxx) FILE( GLOB HPPS [^.]*.hpp [^.]*.h) INCLUDE_DIRECTORIES(${PROJ_SOURCE_DIR} ${PROJ_BINARY_DIR}/src/bindings/rtt + ${CMAKE_CURRENT_BINARY_DIR}/src/bindings/rtt/ ${OROCOS_RTT_INCLUDE_DIRS} ${OROCOS_INSTALL}/include/rtt /usr/include/orbsvcs) ADD_DEFINITIONS(-D_REENTRANT) INCLUDE_DIRECTORIES(/usr/include/orbsvcs /usr/include/rtt) @@ -33,8 +34,8 @@ IF( OROCOS_PLUGIN ) INSTALL_FILES( /include/kdl/bindings/rtt FILES ${HPPS}) TARGET_LINK_LIBRARIES(orocos-kdltk-${OROCOS_TARGET} orocos-kdl orocos-rtt-${OROCOS_TARGET}) - CONFIGURE_FILE( kdltk.pc.in src/bindings/rtt/orocos-kdltk-${OROCOS_TARGET}.pc @ONLY) - INSTALL_FILES( /lib/pkgconfig FILES orocos-kdltk-${OROCOS_TARGET}.pc) + CONFIGURE_FILE( kdltk.pc.in ${CMAKE_CURRENT_BINARY_DIR}/orocos-kdltk-${OROCOS_TARGET}.pc @ONLY) + INSTALL_FILES( /lib/pkgconfig FILES ${CMAKE_CURRENT_BINARY_DIR}/orocos-kdltk-${OROCOS_TARGET}.pc) add_subdirectory(corba) add_subdirectory(tests) diff --git a/src/bindings/rtt/corba/CMakeLists.txt b/src/bindings/rtt/corba/CMakeLists.txt index 0b41c98..f87fee5 100644 --- a/src/bindings/rtt/corba/CMakeLists.txt +++ b/src/bindings/rtt/corba/CMakeLists.txt @@ -46,10 +46,10 @@ IF(ENABLE_CORBA ) INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib/rtt/${OROCOS_TARGET}/plugins") # Is used for building the library TARGET_LINK_LIBRARIES(orocos-kdltk-corba-${OROCOS_TARGET} orocos-rtt-corba-${OROCOS_TARGET} orocos-kdltk-${OROCOS_TARGET} ${CORBA_LIBRARIES}) - CONFIGURE_FILE( orocos-kdltk-corba.pc.in src/bindings/rtt/corba/orocos-kdltk-corba-${OROCOS_TARGET}.pc @ONLY) + CONFIGURE_FILE( orocos-kdltk-corba.pc.in ${CMAKE_CURRENT_BINARY_DIR}/orocos-kdltk-corba-${OROCOS_TARGET}.pc @ONLY) INSTALL_TARGETS(/lib/rtt/${OROCOS_TARGET}/plugins orocos-kdltk-corba-${OROCOS_TARGET}) - INSTALL_FILES( /lib/pkgconfig FILES orocos-kdltk-corba-${OROCOS_TARGET}.pc) + INSTALL_FILES( /lib/pkgconfig FILES ${CMAKE_CURRENT_BINARY_DIR}/orocos-kdltk-corba-${OROCOS_TARGET}.pc) add_subdirectory(tests) -- 1.6.5.7