Excluding targets from install set

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Excluding targets from install set

Gordon Koefner
Hi all!

We have been migrating our buildsystem to CMake and are trying to use
the `install` command to deploy different parts of the software.
However `make install` also installs artifacts from our dependencies,
internal as well as 3rd party, that are unnecessary/unwanted.

Is there a native way to exclude certain subdirectories or build targets
from the install set? The only solution I could think of is to manually
add an option, e.g.:  

option(${TARGET_NAME}_INSTALL on "") # on by default

Maybe the culprit is also that we are using find_path and
add_subdirectory to add any internal dependencies we have to the build
tree - I am starting to think that this is a mistake.

I have read about ExternalProject - but I am unsure whether this is the
correct way to go about it but it does allow modification of another build.

How do you guys solve this issue, how can I define which dependencies I
want installed?

I really want to avoid writing a shellscript to filter out any unwanted

Best Regards and thank you in advance!


Gordon Koefner - Software Engineer

VIRES Simulationstechnologie GmbH
A Member of the MSC.Software Group of Companies
Grassinger Strasse 8 ▪ 83043 Bad Aibling ▪ Germany
Phone: +49.8061.939093-54
Fax: +49.8061.939093-13
Email: [hidden email]
Internet: www.vires.com

VIRES Simulationstechnologie GmbH, Firmensitz: Grassinger Strasse 8, D-83043 Bad Aibling
Registergericht: Traunstein - HRB 10410, Geschäftsführer: Marius Dupuis
Email Disclaimer: https://vires.com/e-mail-disclaimer/


Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe: