[Cmake] Undefined ${CMAKE_COMMAND} in POST_INSTALL_SCRIPT
Anton Deguet
anton at cs.jhu.edu
Thu Sep 2 15:11:09 EDT 2004
Hello,
I'm having a problem I really can't figure in a CMake post install
script. I am using SET_TARGET_PROPERTIES as follows:
# Install the pdf file
INSTALL_TARGETS(/share/cisst/doc/doxygen
${cisstDocDoxygen_BINARY_DIR}/latex/refman.pdf)
# Install the html files generated
SET_TARGET_PROPERTIES(${cisstDocDoxygen_BINARY_DIR}/latex/refman.pdf
PROPERTIES POST_INSTALL_SCRIPT
${CMAKE_CURRENT_SOURCE_DIR}/postInstall.cmake)
The install script has the following code:
MESSAGE("Custom installation of Doxygen HTML pages")
# List of files to install
FILE(GLOB FILES_TO_INSTALL html/*.*)
# Copy these files using CMake to remain portable
FOREACH(file ${FILES_TO_INSTALL})
MESSAGE(${CMAKE_COMMAND}
" " ${file} " " ${CMAKE_INSTALL_PREFIX})
# EXEC_PROGRAM(${CMAKE_COMMAND}
# ARGS copy ${file}
${CMAKE_INSTALL_PREFIX}/share/cisst/doc/doxygen)
ENDFOREACH(file)
when I try "make install", the first message appears correctly but the
variables ${CMAKE_COMMAND} and ${CMAKE_INSTALL_PREFIX} are empty.
What should I do? I could probably define CMAKE_COMMAND but I need to
pass the current value of CMAKE_INSTALL_PREFIX.
Sincerely,
Anton Deguet
--
Anton Deguet Systems Engineer
ERC CISST Johns Hopkins University
http://cisstweb.cs.jhu.edu 410 516 5261
More information about the Cmake
mailing list