From 29f9853455002bba46262ded9c1b57656796af75 Mon Sep 17 00:00:00 2001 From: Francisco Javier Trujillo Mata Date: Mon, 25 Oct 2021 23:49:43 +0200 Subject: [PATCH] Fix cmake config for POSITION_INDEPENDENT_CODE enabling it just when BUILD_SHARED_LIBS is ON --- src/lib_json/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib_json/CMakeLists.txt b/src/lib_json/CMakeLists.txt index f0e9d0a..b7596e8 100644 --- a/src/lib_json/CMakeLists.txt +++ b/src/lib_json/CMakeLists.txt @@ -119,7 +119,7 @@ if(BUILD_SHARED_LIBS) OUTPUT_NAME jsoncpp VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_SOVERSION} - POSITION_INDEPENDENT_CODE ON + POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS} ) # Set library's runtime search path on OSX @@ -180,7 +180,7 @@ if(BUILD_OBJECT_LIBS) OUTPUT_NAME jsoncpp VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_SOVERSION} - POSITION_INDEPENDENT_CODE ON + POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS} ) # Set library's runtime search path on OSX