aboutsummaryrefslogtreecommitdiff
path: root/ports/sqlite3/CMakeLists.txt
diff options
context:
space:
mode:
authorJackie Ng <jackie.ng@protonmail.com>2019-06-21 02:40:50 +1000
committerdan-shaw <51385773+dan-shaw@users.noreply.github.com>2019-06-20 09:40:50 -0700
commitdfd5bb46a149bbc2d9b4f4fa6a5fd4df5992cbdb (patch)
treeb94add59faa54698421a354f3e5a1d058e4cbb77 /ports/sqlite3/CMakeLists.txt
parentd3498a8943b8af2fd37b287c766acff8d6623463 (diff)
downloadvcpkg-dfd5bb46a149bbc2d9b4f4fa6a5fd4df5992cbdb.tar.gz
vcpkg-dfd5bb46a149bbc2d9b4f4fa6a5fd4df5992cbdb.zip
[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
Diffstat (limited to 'ports/sqlite3/CMakeLists.txt')
-rw-r--r--ports/sqlite3/CMakeLists.txt8
1 files changed, 7 insertions, 1 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()