From d8019a1fedad67d90aed74fac2ee0660389e3043 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Mon, 14 Jun 2021 14:00:50 +0300
Subject: [PATCH] comment out Libs.private entry if not building a static
library.
---
CMakeLists.txt | 10 +++++-----
sdl12_compat.pc.in | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 45d842f..ea181a9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -207,11 +207,6 @@ if(SDL12DEVEL)
endif()
endif()
- configure_file(sdl12_compat.pc.in sdl12_compat.pc @ONLY)
- install(FILES ${CMAKE_BINARY_DIR}/sdl12_compat.pc
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
- )
-
# !!! FIXME: do we _want_ static builds?
if(STATICDEVEL)
set(ENABLE_STATIC_TRUE "")
@@ -223,6 +218,11 @@ if(SDL12DEVEL)
set(ENABLE_SHARED_TRUE "")
set(ENABLE_SHARED_FALSE "#")
+ configure_file(sdl12_compat.pc.in sdl12_compat.pc @ONLY)
+ install(FILES ${CMAKE_BINARY_DIR}/sdl12_compat.pc
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
+ )
+
configure_file("${CMAKE_SOURCE_DIR}/sdl-config.in" "${CMAKE_BINARY_DIR}/sdl-config" @ONLY)
install(PROGRAMS "${CMAKE_BINARY_DIR}/sdl-config" DESTINATION bin)
endif()
diff --git a/sdl12_compat.pc.in b/sdl12_compat.pc.in
index 39e5c31..d5dac57 100644
--- a/sdl12_compat.pc.in
+++ b/sdl12_compat.pc.in
@@ -10,5 +10,5 @@ Description: An SDL-1.2 compatibility layer that uses SDL 2.0 behind the scenes.
Version: @PROJECT_VERSION@
Provides: sdl = @SDL_VERSION@
Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@
-Libs.private: -L${libdir} @SDL_LIBS@ @SDL_STATIC_LIBS@
+@ENABLE_STATIC_TRUE@Libs.private: -L${libdir} @SDL_LIBS@ @SDL_STATIC_LIBS@
Cflags: -I${includedir}/SDL @SDL_CFLAGS@