From f97189bacd76c511f2c717786ec88cbd0a10023c Mon Sep 17 00:00:00 2001 From: Martin Idel Date: Thu, 20 Dec 2018 01:55:54 +0100 Subject: [PATCH] Build position independent (#79) - for a shared library, no lib file is generated on Windows - needed for Linux to be included in shared libraries --- sqlite3_vendor/sqlite3_cmakelists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sqlite3_vendor/sqlite3_cmakelists.txt b/sqlite3_vendor/sqlite3_cmakelists.txt index d268b78538..f56d696a83 100644 --- a/sqlite3_vendor/sqlite3_cmakelists.txt +++ b/sqlite3_vendor/sqlite3_cmakelists.txt @@ -1,5 +1,6 @@ cmake_minimum_required(VERSION 3.5) -add_library(sqlite3 SHARED sqlite3.c) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) # for Linux, since the library will be used in a shared lib +add_library(sqlite3 sqlite3.c) set_target_properties(sqlite3 PROPERTIES INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib)