[CMake] how to get install/strip target ?

Eric Noulard eric.noulard at gmail.com
Fri Mar 15 10:25:13 EDT 2013


2013/3/15 Martin Koller <martin.koller at etm.at>:
> On Wednesday 13 March 2013 22:43:01 Alexander Neundorf wrote:
>> On Wednesday 13 March 2013, Martin Koller wrote:
>> > cmake 2.8.10, Linux:
>> >
>> > What do I need to do to have cmake creating a make install/strip target ?
>>
>> I guess you do have an install target ?
>> AFAIK install/strip should be always there automatically.
>> It works for me here.
>>
>> Can you post an example project where you don't get the install/strip target ?
>
> ok, today I had the problem again and I can reproduce it.
> cmake version 2.8.10.2, openSuse 12.2
>
> x.c:
> main(){}
>
> CMakeLists.txt:
> project(test)
> add_executable(x x.c)
>
> mkdir build
> cd build
> cmake ..
>
>
> The Makefile does not have a install/strip target

And no "install" target either.

This is the expected behavior, as Alex told you,
you need to have at least one "install" command in order to get
install  or install/strip target.


in the previous example you need something like:

install(TARGETS x DESTINATION bin)

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org


More information about the CMake mailing list