[CMake] CMAKE_INSTALL_PREFIX on Windows Machine

Andreas Pakulat apaku at gmx.de
Mon Feb 7 18:34:29 EST 2011


On 07.02.11 17:24:26, Holmes, David R. III, Ph.D. [RO RM1-24] wrote:
> # In the CPack section
> 
>     IF(${CMAKE_INSTALL_PREFIX} MATCHES
> ${CPACK_PACKAGE_INSTALL_DIRECTORY})
> 
>     ELSE(${CMAKE_INSTALL_PREFIX} MATCHES
> ${CPACK_PACKAGE_INSTALL_DIRECTORY})
> 
>     STRING(REPLACE ${PROJECT_NAME} ${CPACK_PACKAGE_INSTALL_DIRECTORY}
> dummy ${CMAKE_INSTALL_PREFIX} )
> 
>     SET(CMAKE_INSTALL_PREFIX ${dummy} CACHE PATH "" FORCE)
> 
>     ENDIF(${CMAKE_INSTALL_PREFIX} MATCHES
> ${CPACK_PACKAGE_INSTALL_DIRECTORY})

Thats your problem right there. Whenever CMAKE_INSTALL_PREFIX is not the
same as the CPACK_PACKAGE_INSTALL_DIRECTORY its reset to be the same
using FORCE which means whatever was there in the case is overwritten.

Looks like the author does not want anybody to change the install prefix
once its been set.

Andreas

-- 
Be careful!  Is it classified?


More information about the CMake mailing list