[CMake] INSTALL(TARGET ...) Target not in this folder
Aaron_Wright at selinc.com
Aaron_Wright at selinc.com
Fri Jul 16 13:30:12 EDT 2010
My bad. I forget the address for the mailing list all the time, and didn't
know that would happen.
That solution would certainly work, and might be what I have to use in the
future. I was wondering why the INSTALL(TARGET command cares what
directory the target was in? Can't it just do what is right?
-------------------------------------------------------------
Aaron Wright
From:
Rolf Eike Beer <eike at sf-mail.de>
To:
cmake at cmake.org
Date:
07/16/2010 10:10 AM
Subject:
Re: [CMake] INSTALL(TARGET ...) Target not in this folder
Sent by:
cmake-bounces at cmake.org
Am Friday 16 July 2010 schrieb Aaron_Wright at selinc.com:
Please do not reply to a random message to start a new discussion. This
makes
thread sorting appear completely random.
> I have sort of an interesting directory structure for my projects. I
have
> a folder for libraries, a folder for executables, and a folder for
> packages. The packages folder contains debian packages that combine
> libraries and executables from the other two folders. So they look sort
of
> like:
>
> IF(NOT TARGET executable_a)
> ADD_SUBDIRECTORY(
> "${PROJECT_SOURCE_DIR}/../../executables/executable_a"
> "${CMAKE_BINARY_DIR}/executable_a")
> ENDIF()
>
> INSTALL(
> TARGET executable_a
> DESTINATION bin)
[...]
> On a side note, I don't put the INSTALL(TARGET command in executable_a's
> folder because not everyone that ADD_SUBDIRECTORY on that folder wants
> executable_a to be installed. In fact this is the problem I was trying
to
> solve by moving the INSTALL command up a level.
Why not making that install decision depend on a variable then?
IF (DO_INSTALL_EXE_A)
INSTALL(TARGETS ...)
ENDIF ()
Putting this in the executables directory and setting all the DO_INSTALL_*
things right in the deb directory should do the trick.
Eike
[attachment "signature.asc" deleted by Aaron Wright/SEL]
_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100716/c0605673/attachment.htm>
More information about the CMake
mailing list