Skip to content

Commit

Permalink
Allow Position Independent Code for Static Library (#73)
Browse files Browse the repository at this point in the history
Build the static library with the fPIC compiler flag, so that it can be linked into a shared library.
  • Loading branch information
nkowdley authored and vareddy committed Mar 20, 2018
1 parent 1f2b7e8 commit 908c896
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ if (BUILD_SHARED_LIBRARY)
set_target_properties(${SDK_TARGET_NAME} PROPERTIES SUFFIX ".so")
else()
add_library(${SDK_TARGET_NAME} "")
set_target_properties(${SDK_TARGET_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()

# Download and include rapidjson, not optional
Expand Down

0 comments on commit 908c896

Please sign in to comment.