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 CMake option to disable installation of headers and libraries #11

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

kodemeister
Copy link

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 use ENET_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:

set(UPNPC_NO_INSTALL ON CACHE BOOL "Don't install any libraries build for miniupnpc")

@cgutman cgutman merged commit bbfe93c into cgutman:moonlight Sep 21, 2023
@cgutman
Copy link
Owner

cgutman commented Sep 21, 2023

Thanks, merged and bumped the ENet submodule in moonlight-common-c so Sunshine can pick up the change.

@kodemeister
Copy link
Author

Perfect, thank you! Will make a companion PR to Sunshine repo with that bumped submodule.

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