Add CMake option to disable installation of headers and libraries #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is intended to fix LizardByte/Sunshine#1591. Basically Sunshine uses CMake's
add_subdirectory
to add enet library to the project. Unfortunately this causes enet headers and static library to be installed into Sunshine prefix. All Debian, Ubuntu, Fedora, Arch (and probably other) nightly builds contain the following unwanted files:/usr/include/enet/*.h
/usr/lib/static/libenet.a
The PR adds new CMake option named
ENET_NO_INSTALL
to disable installation of any enet files. By default installation is enabled. If changes look good to you, I'll create another PR in Sunshine repo which will useENET_NO_INSTALL
to get rid of enet headers/libs.In fact, Sunshine already does something similar for miniupnpc library. It uses
UPNPC_NO_INSTALL
option to disable installation of its headers/libs: