File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -305,7 +305,7 @@ add_library (mongocrypt_static STATIC ${MONGOCRYPT_SOURCES})
305305# the common case that users are setting -DCMAKE_C_FLAGS='-fPIC'
306306string (FIND "${CMAKE_C_FLAGS} " "-fPIC" FPIC_LOCATION)
307307if (NOT WIN32 AND ENABLE_PIC AND "${FPIC_LOCATION} " EQUAL "-1" )
308- target_compile_options ( mongocrypt_static PUBLIC -fPIC )
308+ set_property ( TARGET mongocrypt_static PROPERTY POSITION_INDEPENDENT_CODE TRUE )
309309 message ("Adding -fPIC to compilation of mongocrypt_static components" )
310310endif ()
311311target_include_directories (
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ add_library (
100100
101101string (FIND "${CMAKE_C_FLAGS} " "-fPIC" FPIC_LOCATION)
102102if (NOT WIN32 AND ENABLE_PIC AND "${FPIC_LOCATION} " EQUAL "-1" )
103- target_compile_options ( kms_message_static PUBLIC -fPIC )
103+ set_property ( TARGET kms_message_static PROPERTY POSITION_INDEPENDENT_CODE TRUE )
104104 message ("Adding -fPIC to compilation of kms_message_static components" )
105105endif ()
106106
You can’t perform that action at this time.
0 commit comments