Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
windows:mingw:win64
mingw64-SDL2_net
0005-cmake-cannot-install-SDL2_net-when-SDL2-is...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0005-cmake-cannot-install-SDL2_net-when-SDL2-is-also-buil.patch of Package mingw64-SDL2_net
From d98c71106d6fa5245741ef340f1c89c790a5cbf4 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten <anonymous.maarten@gmail.com> Date: Thu, 9 Feb 2023 20:37:28 +0100 Subject: [PATCH 5/7] cmake: cannot install SDL2_net when SDL2 is also built but not installed --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 11109c2..17dfb9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,12 @@ set(SDL2NET_DEBUG_POSTFIX "d" CACHE STRING "Name suffix for debug builds") mark_as_advanced(SDL2NET_DEBUG_POSTFIX) +set(sdl2net_install_enableable ON) +if ((TARGET SDL2 OR TARGET SDL2-static) AND SDL2_DISABLE_INSTALL) + # Cannot install SDL2_net when SDL2 is built in same built, and is not installed. + set(sdl2net_install_enableable OFF) +endif() + include(CMakeDependentOption) include(CMakePackageConfigHelpers) include(GNUInstallDirs) @@ -48,7 +54,7 @@ include(GNUInstallDirs) option(CMAKE_POSITION_INDEPENDENT_CODE "Build static libraries with -fPIC" ON) option(BUILD_SHARED_LIBS "Build the library as a shared library" ON) -option(SDL2NET_INSTALL "Enable SDL2_net install target" ${SDL2NET_ROOTPROJECT}) +cmake_dependent_option(SDL2NET_INSTALL "Enable SDL2_net install target" ${SDL2NET_ROOTPROJECT} ${sdl2net_install_enableable} OFF) cmake_dependent_option(SDL2NET_SAMPLES "Build SDL2_net samples" ${SDL2NET_ROOTPROJECT} "${SDL2test_FOUND}" OFF) -- 2.43.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor