[CMake] Trouble with install()

Braden Walters meoblast at aol.com
Thu Nov 18 22:55:15 EST 2010


Hi. I'm having some issues with the install() command in CMake. I have
the following code:

#Install headers
set(HEADERS
	test.hpp)
foreach(HEADER ${HEADERS})
	install(TARGETS ${CMAKE_CURRENT_SOURCE_DIR}/include/${HEADER}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/PROJECT/${HEADER})
endforeach()

When I run CMake on the script, I get:

CMake Error at CMakeLists.txt:55 (install):
  install TARGETS given target
  "/home/HOME/Documents/Development/PROJECT/include/test.hpp" which does
  not exist in this directory.

The path listed in that file does exist, though; I've checked to make
sure. What could be causing this problem? Thanks in advance.



More information about the CMake mailing list