[CMake] INSTALL(TARGET ...) Target not in this folder
Rolf Eike Beer
eike at sf-mail.de
Fri Jul 16 13:09:35 EDT 2010
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100716/7162f682/attachment.pgp>
More information about the CMake
mailing list