[CMake] CMAKE_INSTALL_PREFIX on Windows Machine

Holmes, David R. III, Ph.D. [RO RM1-24] Holmes.David3 at mayo.edu
Tue Feb 8 03:06:49 EST 2011


Andreas-

Thank you for educating me.  I really need to spend more time with CMake to understand these issues.

david

====================================================
David R Holmes III
Biomedical Imaging Resource Core Facility Director

Department of Physiology and Biomedical Engineering 
Mayo Clinic College of Medicine 

Ph:  507-266-4250       Fax:  507-284-1632 
holmes.david3 at mayo.edu
==================================================== 


-----Original Message-----
From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of Andreas Pakulat
Sent: Monday, February 07, 2011 5:34 PM
To: cmake at cmake.org
Subject: Re: [CMake] CMAKE_INSTALL_PREFIX on Windows Machine

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?
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list