Skip to content

Commit ca45c67

Browse files
committed
Fix SRombauts#167 sqlite3 library cannot be built on Linux when dynamically linked
1 parent 5dcb9af commit ca45c67

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sqlite3/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ add_library(sqlite3
1010
sqlite3.c
1111
sqlite3.h
1212
)
13+
14+
if (UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
15+
set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-fPIC")
16+
endif (UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))

0 commit comments

Comments
 (0)