From 2fba2950e4ea9cf6a71f3adfdc62c5974e629366 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Sun, 10 Jul 2022 12:57:48 -0400 Subject: [PATCH] Correctly mark internal libraries to be built as static libraries We were relying on CMake having a particular default preferred behavior, but this causes problems when building tdnf RPMs on Fedora, where CMake's default behavior is to produce shared libraries. Explicitly set up these internal libraries as static libraries to resolve the issue. Signed-off-by: Neal Gompa --- common/CMakeLists.txt | 2 +- history/CMakeLists.txt | 2 +- jsondump/CMakeLists.txt | 2 +- solv/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 9c7aff6c0..ed897fe30 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -8,7 +8,7 @@ include_directories(${CMAKE_SOURCE_DIR}/include) -add_library(${LIB_TDNF_COMMON} +add_library(${LIB_TDNF_COMMON} STATIC configreader.c memory.c setopt.c diff --git a/history/CMakeLists.txt b/history/CMakeLists.txt index 415d5432b..18807e8c2 100644 --- a/history/CMakeLists.txt +++ b/history/CMakeLists.txt @@ -6,6 +6,6 @@ # of the License are located in the COPYING file of this distribution. # -add_library(${LIB_TDNF_HISTORY} +add_library(${LIB_TDNF_HISTORY} STATIC history.c ) diff --git a/jsondump/CMakeLists.txt b/jsondump/CMakeLists.txt index d3cb1c47d..c73316d81 100644 --- a/jsondump/CMakeLists.txt +++ b/jsondump/CMakeLists.txt @@ -12,7 +12,7 @@ add_executable(${TDNF_JSON_BIN} test.c ) -add_library(${LIB_TDNF_JSONDUMP} +add_library(${LIB_TDNF_JSONDUMP} STATIC jsondump.c ) diff --git a/solv/CMakeLists.txt b/solv/CMakeLists.txt index 260c79b97..d5c330ed7 100644 --- a/solv/CMakeLists.txt +++ b/solv/CMakeLists.txt @@ -8,7 +8,7 @@ include_directories(${CMAKE_SOURCE_DIR}/include) -add_library(${LIB_TDNF_SOLV} +add_library(${LIB_TDNF_SOLV} STATIC tdnfpackage.c tdnfpool.c tdnfquery.c