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

Improve cmake integration #47

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

arsdever
Copy link

@arsdever arsdever commented Apr 8, 2024

In case the user wants to have your lib as a submodule, they need to add the folder in the include directories directly

target_include_directories(target PRIVATE path_to_filewatch)

which does work but looks a bit like a workaround.

Another approach commonly used (to my observation) is to create an imported target and use it

add_library(filewatch INTERFACE IMPORTED)
target_include_directories(filewatch PUBLIC path_to_filewatch)

and use it as the import target.

The PR implements something like the last one, but instead directly in the library, giving the user the ability to simply do the following

target_link_libraries(my_target PRIVATE filewatch::filewatch)

@ThomasMonkman
Copy link
Owner

Thank you for your work :) and I'm right in assuming this is backwards compatible?

@arsdever
Copy link
Author

Thank you for your work :) and I'm right in assuming this is backwards compatible?

I don't see a reason for this to break backward compatibility.

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

Successfully merging this pull request may close these issues.

2 participants