Added -fPIC flag to Linux builds

* When linking a shared library against SQLiteCpp, GCC/Clang throws a relocation error
This commit is contained in:
Nicholas Corgan 2013-10-27 09:35:32 -07:00
parent 1af6930fc7
commit fd903b286d

View File

@ -22,3 +22,6 @@ add_library (SQLiteCpp
Transaction.cpp
Transaction.h
)
if(LINUX AND (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-fPIC")
endif(LINUX AND (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))