[CMake] Install target is not called
Eric Noulard
eric.noulard at gmail.com
Tue Feb 17 04:35:13 EST 2009
2009/2/17 Pavel Shevaev <pacha.shevaev at gmail.com>:
>> If your binary to install is a CMake target (like in your example)
>> you should use:
>>
>> install(targets foo
>> RUNTIME DESTINATION ${foo_SOURCE_DIR}/bin)
>>
>
> This one didn't work neither :(
>
>> moreover installing in ${foo_SOURCE_DIR} is a bit strange,
>
> Well, there is a reason for this. My application is not supposed to be
> installed to any public location(e.g /usr/local/bin) and for that
> reason it places all binaries into the local bin directory not
> polluted with CMake's internal stuff.
Yes but you may still want to separate BUILD from SOURCE tree
and install in
${PROJECT_BINARY_DIR}/bin
>> SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
>
> That did the trick, thank you so much! However, I'm still wondering
> why install doesn't work since I may need some handy stuff provided
> with install...
That's right, it should work.
If you have time to build-up a possibly minimalistic example project
which exhibits the bug then you should file a bug:
http://public.kitware.com/Bug/my_view_page.php
--
Erk
More information about the CMake
mailing list