make install fails in some particular cases

Hi,

I'm trying to install orocos-toolchain-rtt but get the following error:

CMake Error at build/orocos-toolchain-rtt/cmake_install.cmake:36 (FILE):
file INSTALL cannot find file
"/home/common/.hudson/workspace/orocos_toolchain_ros/orocos_toolchain_ros/rtt/build/build/orocos-
toolchain-rtt/orocos-rtt-config.cmake"
to install.

Changing the rtt/CMakeLists.txt into:
<sni

# Main package configuration file
CONFIGURE_FILE(orocos-rtt-config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/orocos-rtt-config.cmake @ONLY)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/orocos-rtt-config.cmake DESTINATION
"${CONFIG_FILE_PATH}"\
)

# Version file
CONFIGURE_FILE(orocos-rtt-config-version.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/orocos-rtt-config-version.cmake
@ONLY)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/orocos-rtt-config-version.cmake
DESTINATION "${CONFIG_FIL\
E_PATH}")
<sni

resolves the problem. I think the ${CMAKE_CURRENT_BINARY_DIR} should be added
to the configure_file statement or removed from the install statement.

I don't know which is best.

Ruben

Ruben Smits's picture

make install fails in some particular cases

On Tuesday 14 September 2010 10:32:33 Ruben Smits wrote:
> Hi,
>
> I'm trying to install orocos-toolchain-rtt but get the following error:
>
> CMake Error at build/orocos-toolchain-rtt/cmake_install.cmake:36 (FILE):
>
> file INSTALL cannot find file
>
> "/home/common/.hudson/workspace/orocos_toolchain_ros/orocos_toolchain_ros/r
> tt/build/build/orocos-toolchain-rtt/orocos-rtt-config.cmake"
>
> to install.
>
> Changing the rtt/CMakeLists.txt into:
>
> <sni

>
> # Main package configuration file
>
> CONFIGURE_FILE(orocos-rtt-config.cmake.in
>
> ${CMAKE_CURRENT_BINARY_DIR}/orocos-rtt-config.cmake @ONLY)
>
> INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/orocos-rtt-config.cmake
> DESTINATION "${CONFIG_FILE_PATH}"\
>
> )
>
> # Version file
>
> CONFIGURE_FILE(orocos-rtt-config-version.cmake.in
>
> ${CMAKE_CURRENT_BINARY_DIR}/orocos-rtt-config-version.cmake @ONLY)
>
> INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/orocos-rtt-config-version.cmake
> DESTINATION "${CONFIG_FIL\
>
> E_PATH}")
>
> <sni

>
> resolves the problem. I think the ${CMAKE_CURRENT_BINARY_DIR} should be
> added to the configure_file statement or removed from the install
> statement.

I think it might be a cmake 2.6.2 issue, with cmake 2.8.x I do not have any
problems. Anyway the attached patch should make the CMakeLists.txt more
robust.

Also the find_package(Orocos-RTT 2.0.0) stuff in OCL is also not working
properly with cmake 2.6.2.

Ruben

> I don't know which is best.
>
> Ruben