[CMake] CMake, Cpack and NSIS woes.
Andrew Maclean
andrew.amaclean at gmail.com
Wed Oct 7 18:12:18 EDT 2009
Thankyou very much for this hint. I will try it out.
Regards
Andrew
On Wed, Oct 7, 2009 at 10:56 PM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> Andrew Maclean wrote:
>>
>> The only way that I can get this to work is to do this:
>>
>> string(REPLACE "/" "\\\\" NATIVE_CMAKE_INSTALL_PATH ${INSTALL_DIRECTORY})
>> set(CPACK_PACKAGE_INSTALL_DIRECTORY ${NATIVE_CMAKE_INSTALL_PATH}
>> CACHE INTERNAL "")
>
> So, to avoid \\\\\\ hell with CPack, you can do what we do in CMake:
>
> We configure the CPackOptions into a file:
>
> CONFIGURE_FILE("${CMake_SOURCE_DIR}/CMakeCPackOptions.cmake.in"
> "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY)
> SET(CPACK_PROJECT_CONFIG_FILE
> "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake")
> # then set this CPack variable before including CPack
> SET(CPACK_PROJECT_CONFIG_FILE
> "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake")
>
> The problem with CPack is that the variables get run through the CMake
> parser too many times. By using the CPACK_PROJECT_CONFIG_FILE, that file
> gets included at CPack time and only has one CMake parse on the variables
> inside it.
>
> I will look at the DESTDIR issue with NSIS...
>
>
>
> -Bill
>
> _______________________________________________
> 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
>
--
___________________________________________
Andrew J. P. Maclean
Centre for Autonomous Systems
The Rose Street Building J04
The University of Sydney 2006 NSW
AUSTRALIA
Ph: +61 2 9351 3283
Fax: +61 2 9351 7474
URL: http://www.acfr.usyd.edu.au/
___________________________________________
More information about the CMake
mailing list