[CMake] Question about CMAKE_INSTALL_PREFIX

Joachim Ziegler ziegler at mpi-sb.mpg.de
Wed Sep 26 04:50:49 EDT 2007


Hello,

why does the following not work? I want to install a binary, which has 
just been built, into a bin/ directory of the build tree:

SET(CMAKE_INSTALL_PREFIX ${PROJECT_BINARY_DIR})
MESSAGE(${CMAKE_INSTALL_PREFIX})
INSTALL(TARGETS startCompletionServer RUNTIME DESTINATION bin)


The path contained in ${CMAKE_INSTALL_PREFIX} output correctly by 
MESSAGE  in a "make rebuild_cache", but then I get:

  $ make install
[100%] Built target startCompletionServer
Install the project...
-- Install configuration: ""
-- Install configuration: ""
-- Installing /usr/local/bin/startCompletionServer
CMake Error: Error in cmake code at
/KM/usr/ziegler/ExGen/cmake/build/src/cmake_install.cmake:30:
FILE INSTALL cannot copy file 
"/KM/usr/ziegler/ExGen/cmake/build/src/CMakeFiles/CMakeRelink.dir/startCompletionServer" 
to "/usr/local/bin/startCompletionServer".


Joachim



More information about the CMake mailing list