Skip to content

Commit

Permalink
Fix #167 sqlite3 library cannot be built on Linux when dynamically li…
Browse files Browse the repository at this point in the history
…nked
  • Loading branch information
SRombauts committed Mar 2, 2019
1 parent 5dcb9af commit ca45c67
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sqlite3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ add_library(sqlite3
sqlite3.c
sqlite3.h
)

if (UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-fPIC")
endif (UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))

0 comments on commit ca45c67

Please sign in to comment.