From dfd5bb46a149bbc2d9b4f4fa6a5fd4df5992cbdb Mon Sep 17 00:00:00 2001 From: Jackie Ng Date: Fri, 21 Jun 2019 02:40:50 +1000 Subject: [sqlite3]: Shared library support for Linux (#6856) * [sqlite]: Shared library support for Linux * [sqlite3]: Switch back to CMAKE_SYSTEM_NAME checks per original PR (#6122) * [sqlite3]: Remove redundant "WindowsStore" system name check as "Windows" should already catch it. * [sqlite3]: Re-bump portfile * [sqlite3] added error message --- ports/sqlite3/CMakeLists.txt | 8 +++++++- ports/sqlite3/CONTROL | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ports/sqlite3/CMakeLists.txt b/ports/sqlite3/CMakeLists.txt index a2f0aeb03..16f529daf 100644 --- a/ports/sqlite3/CMakeLists.txt +++ b/ports/sqlite3/CMakeLists.txt @@ -3,7 +3,13 @@ project(sqlite3 C) include_directories(.) if(BUILD_SHARED_LIBS) - set(API "-DSQLITE_API=__declspec(dllexport)") + if(CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Darwin") + set(API "-DSQLITE_API=__attribute__((visibility(\"default\")))") + elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") + set(API "-DSQLITE_API=__declspec(dllexport)") + else() + message(FATAL_ERROR "Unsupported platform: ${CMAKE_SYSTEM_NAME}") + endif() else() set(API "-DSQLITE_API=extern") endif() diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL index 7bba4d78c..829b66254 100644 --- a/ports/sqlite3/CONTROL +++ b/ports/sqlite3/CONTROL @@ -1,5 +1,5 @@ Source: sqlite3 -Version: 3.28.0 +Version: 3.28.0-1 Homepage: https://sqlite.org/ Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. -- cgit v1.2.3