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

Make install targets optional in CMake #266

Open
arludwig opened this issue Oct 13, 2023 · 0 comments
Open

Make install targets optional in CMake #266

arludwig opened this issue Oct 13, 2023 · 0 comments

Comments

@arludwig
Copy link

I am integrating SimpleBLE in a project as submodule, to be compiled and built along with the project's code. I also use install rules for my project.

Now I have the problem, that SimpleBLE's install rules are also added and executed, which is not what I want or need. Many projects offer some sort of option to disable install rules. For SimpleBLE this could look like

option(INSTALL_SimpleBLE "Disable installing" ON)

that can be set before including

set(INSTALL_SimpleBLE OFF)
add_subdirectory("SimpleBLE/simpleble")

My current workaround is to use the EXCLUDE_FROM_ALL flag for add_subdirectory()

add_subdirectory("SimpleBLE/simpleble" EXCLUDE_FROM_ALL)

which works fine for me. But technically it does way more than just disabling installs, so I think it would be nice for SimpleBLE to offer such option.

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

No branches or pull requests

1 participant