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 functionality to install needed header files #145

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

vancraar
Copy link
Member

Addressing the missing installation of header files mentioned in #140. @freifrauvonbleifrei Which headers should be installed and are they dependent on a certain folder structure, or can they simply all be located together in the include folder?

@freifrauvonbleifrei
Copy link
Contributor

so far, we've been using them with the subfolder paths (#include "task/Task.hpp" etc.), but maybe it would be clearer for library users to use something like #include "discotec/task/Task.hpp" to avoid ambiguity in case someone has a similar/same named header -- what do you think @vancraar ?

@freifrauvonbleifrei
Copy link
Contributor

(maybe we could skip the subpaths and go for #include "discotec/Task.hpp"?)

@freifrauvonbleifrei
Copy link
Contributor

also I would be in favor of a CMake namespace, but this here appears to be insufficient (added in src/CMakeLists.txt):

add_library(discotecTargets INTERFACE)
add_library(discotec::discotec ALIAS discotec)

install(EXPORT discotecTargets
  FILE discotec.cmake
  NAMESPACE discotec::
  DESTINATION lib/cmake/discotec
)

@vancraar do you know how to do it?

@freifrauvonbleifrei
Copy link
Contributor

@vancraar am I right to assume that we would have to introduce a src/discotec subfolder to have the includes work as discotec/task/Task.hpp for both the examples in-code (with add_subdirectory) and for code that uses the installed lib (with find_package)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants