[CMake] Creating a derived executable target on Windows/Visual Studio

SnakE snake.scaly at gmail.com
Sun Aug 30 12:34:27 EDT 2015


Hello CMake pros,

I wonder if what I'm trying to do is possible.

I have an executable target, let's call it "normal". I want to create
another target, called "derived", which would be a UPX-compressed version
of "normal", and which I would be able to install as if it was a regular
CMake target. E.g.

add_executable(normal ${sources} ${libs})
# magic happens here
install(TARGET derived DESTINATION bin)

I tried several approaches but didn't succeed. I don't seem to be able to
create a custom target that CMake would consider installable. I'm also
struggling with rules that would automatically work for all configurations
in Visual Studio. Is there a way?

Thanks,
SnakE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150830/f8e1ea38/attachment.html>


More information about the CMake mailing list