2013/3/11 hce <[email protected]>:
> Thanks Petr. I changed to use SCRIPT, it still got syntax error either.
> Please correct me what is wrong in the following statement.
>
> install(SCRIPT "
>      if (not exists "${destination}/myfile.txt")
>          install(FILES "${source}/myfile.txt" DESTINATION ${destination})
>      endif()
> ")
>
> Also, even the syntax is fixed, I am not clear how it can work. The
> install(FILES "${source}/myfile.txt" DESTINATION ${destination}) is
> basically to install ${source}/myfile.txt to %config
> "${destination}/myfile.txt" in the spec, where the check "if (not exists
> "${destination}/myfile.txt")" can be performed during installation?
>
> Appreciate correct me.

If your are using CPackRPM generator for your RPM
AND you want this particular file to be flagged as "%config" then
you should probably use CPACK_RPM_USER_FILELIST.

See: cpack --help-variable CPACK_RPM_USER_FILELIST

This is specific to CPack RPM generator.
-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

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

Reply via email to