[CMake] What's wrong with the INSTALL Path error?

Kermit Mei kermit.mei at gmail.com
Thu Mar 12 10:20:53 EDT 2009


On Thu, 2009-03-12 at 08:12 -0400, Philip Lowman wrote:
> On Thu, Mar 12, 2009 at 3:43 AM, Kermit Mei <kermit.mei at gmail.com>
> wrote:
>         Hello, I use the cmake-command on unix and it works well, but.
>         But
>         Windows, it told me that:
>         
>         CMake Error at src/gui/CMakeLists.txt:99 (INSTALL):
>            install Library TARGETS given no DESTINATION!
>         
>         The INSTLL in CmakeLists.txt is like this:
>         INSTALL(PROGRAMS ${PROJECT_BINARY_DIR}/bin/qfrt DESTINATION
>         bin)
> 
> From the documentation about PROGRAMS mode:
> 
> "The PROGRAMS form is identical to the FILES form except that the
> default permissions for the installed file also include OWNER_EXECUTE,
> GROUP_EXECUTE, and WORLD_EXECUTE. This form is intended to install
> programs that are not targets, such as shell scripts. Use the TARGETS
> form to install targets built within the project."
> 
> 
> Try INSTALL(TARGETS qfrt RUNTIME DESTINATION bin).  This is assuming
> your qfrt executable is being created by add_executable(qfrt ...)
> 
> Unlike the Makefile generator, the Visual Studio generator for CMake
> doesn't output "qfrt" in ${PROJECT_BINARY_DIR}/bin so CMake can't find
> it.
Thank you, and that helped me;p




More information about the CMake mailing list