summaryrefslogtreecommitdiff
path: root/libs/libaxolotl/src/protobuf-c/CMakeLists.txt
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-02-13 07:56:33 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-02-13 09:09:08 +0300
commit193f645f65ad4ffdec3186e4176b23af10861199 (patch)
treee1b16b48ac74c5f03f99a98798e849f6dd9752cc /libs/libaxolotl/src/protobuf-c/CMakeLists.txt
parent36c32a13878d3bd94e88bd9c764f1eadb05ea1ed (diff)
libs:
libaxolotl: updated libaxolotl (libsignal-c) from (https://github.com/WhisperSystems/libsignal-protocol-c)
Diffstat (limited to 'libs/libaxolotl/src/protobuf-c/CMakeLists.txt')
-rw-r--r--libs/libaxolotl/src/protobuf-c/CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/libaxolotl/src/protobuf-c/CMakeLists.txt b/libs/libaxolotl/src/protobuf-c/CMakeLists.txt
index 63f18db8ae..1af25df194 100644
--- a/libs/libaxolotl/src/protobuf-c/CMakeLists.txt
+++ b/libs/libaxolotl/src/protobuf-c/CMakeLists.txt
@@ -3,7 +3,10 @@ IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
ENDIF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
IF(CMAKE_COMPILER_IS_GNUCC)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-sign-compare -Wno-sign-conversion")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-sign-compare")
+ IF(GCC_WARN_SIGN_CONVERSION)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-sign-conversion")
+ ENDIF(GCC_WARN_SIGN_CONVERSION)
ENDIF(CMAKE_COMPILER_IS_GNUCC)
IF(CMAKE_C_COMPILER_ID MATCHES "Clang")
@@ -15,3 +18,8 @@ set(protobuf_SRCS
)
add_library(protobuf-c OBJECT ${protobuf_SRCS})
+
+# Add -fPIC flag
+if(BUILD_SHARED_LIBS)
+ set_property(TARGET protobuf-c PROPERTY POSITION_INDEPENDENT_CODE ON)
+endif()