[CMake] ExternalProject install
Bálint Aradi
baradi09 at gmail.com
Fri Aug 16 15:24:15 EDT 2019
Dear All,
I try to understand the install logic for ExternalProjects. I added
several CMake-based external projects to my main build, using the
ExternalProject_Add() method. If I generate the build system and issue
'make install', the external projects install routines are also
triggered. Is that the expected behaviour? (I have set INSTALL_COMMAND
to "" in the ExternalProject_Add() call.)
Is there a way, to switch this behaviour on or off? The only way I could
achieve this was to put the CMakeLists.txt with the
ExternalProject_Add() call into a subfolder and call that subfolder with
add_subdirectory(.... EXCLUDE_FROM_ALL). But this is somewhat
inconvinient, since I have to switch the installation on and off
depending on a variable, so I have to add
if(BUILD_API)
add_subdirectory(...)
else()
add_subdirectory(... EXCLUDE_FROM_ALL)
endif()
branches for each subproject.
Setting EXCLUDE_FROM_ALL TRUE or FALSE in ExternalProject_Add() routine
did not help either.
Any other suggestions?
Thanks in advance.
Best regards,
Bálint
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://cmake.org/pipermail/cmake/attachments/20190816/c263450d/attachment.sig>
More information about the CMake
mailing list