Skip to content

Commit 96bd9fe

Browse files
committed
Fix cmake config for POSITION_INDEPENDENT_CODE enabling it just when BUILD_SHARED_LIBS is ON
1 parent 94a6220 commit 96bd9fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib_json/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ if(BUILD_SHARED_LIBS)
119119
OUTPUT_NAME jsoncpp
120120
VERSION ${PROJECT_VERSION}
121121
SOVERSION ${PROJECT_SOVERSION}
122-
POSITION_INDEPENDENT_CODE ON
122+
POSITION_INDEPENDENT_CODE BUILD_SHARED_LIBS
123123
)
124124

125125
# Set library's runtime search path on OSX
@@ -180,7 +180,7 @@ if(BUILD_OBJECT_LIBS)
180180
OUTPUT_NAME jsoncpp
181181
VERSION ${PROJECT_VERSION}
182182
SOVERSION ${PROJECT_SOVERSION}
183-
POSITION_INDEPENDENT_CODE ON
183+
POSITION_INDEPENDENT_CODE BUILD_SHARED_LIBS
184184
)
185185

186186
# Set library's runtime search path on OSX

0 commit comments

Comments
 (0)