Skip to content

Commit

Permalink
Fix cmake config for POSITION_INDEPENDENT_CODE enabling it just when …
Browse files Browse the repository at this point in the history
…BUILD_SHARED_LIBS is ON
  • Loading branch information
fjtrujy committed Oct 29, 2021
1 parent fa747b1 commit 29f9853
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib_json/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 29f9853

Please sign in to comment.