Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to install only specific CMake targets #510

Closed
metthal opened this issue Feb 26, 2019 · 2 comments · Fixed by #670
Closed

Add option to install only specific CMake targets #510

metthal opened this issue Feb 26, 2019 · 2 comments · Fixed by #670

Comments

@metthal
Copy link
Member

metthal commented Feb 26, 2019

RetDec is a large-scale project containing multiple standalone libraries and binaries. It might be useful if we were able to install only certain parts of RetDec, for example just fileinfo and its dependencies.

This might be achieved through COMPONENT attribute of install directives in CMake but I have never tried it myself. (https://cmake.org/cmake/help/v3.13/command/install.html)

@metthal
Copy link
Member Author

metthal commented Mar 1, 2019

I did some investigation and it doesn't look that good because of multiple reasons:

  1. It is not transitive. So if I specify COMPONENT fileinfo to install target of retdec-fileinfo and use CMAKE_INSTALL_COMPONENT=fileinfo then only retdec-fileinfo is installed. Nothing else.
  2. You cannot specify more than one component in install() directive therefore you can't for example have components for fileinfo, unpacker, ... because they share dependencies.

@PeterMatula
Copy link
Collaborator

Solved in #670 using a custom solution - not a very elegant one, but does everything we want it to do and all the ugliness is located in a single file cmake/options.cmake.

PeterMatula added a commit that referenced this issue Oct 18, 2019
* cmake: added options to build only specific targets.

fix #510

* cmake: add options.cmake file.

I forgot to add this file in the previous commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants