diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-10-23 11:48:43 -0400 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-10-23 11:51:21 -0400 |
commit | ccfdd6deecf9e471016a3c52d58a0e4fbe2a4b61 (patch) | |
tree | 3744949e07a003093b81a3cbf81a43b4cf0f260c /CMakeLists.txt | |
parent | d839392bb6ec3fb13b35d72ef346def18561167b (diff) | |
download | subsurface-ccfdd6deecf9e471016a3c52d58a0e4fbe2a4b61.tar.gz |
Mac build: use more system libraries
libxml2, libxslt, and libsqlite3 are new enough on macOS to no longer
require our own versions.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 735185cb3..ffcafe05a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,9 +117,14 @@ include(cmake/Modules/HandleVersionGeneration.cmake) include(cmake/Modules/RunOnBuildDir.cmake) include(cmake/Modules/cmake_variables_helper.cmake) -pkg_config_library(LIBXML libxml-2.0 REQUIRED) -pkg_config_library(LIBSQLITE3 sqlite3 REQUIRED) -pkg_config_library(LIBXSLT libxslt REQUIRED) +if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + include_directories(${CMAKE_OSX_SYSROOT}/usr/include/libxml2) + set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lxml2 -lxslt -lsqlite3) +else() + pkg_config_library(LIBXML libxml-2.0 REQUIRED) + pkg_config_library(LIBSQLITE3 sqlite3 REQUIRED) + pkg_config_library(LIBXSLT libxslt REQUIRED) +endif() pkg_config_library(LIBZIP libzip REQUIRED) pkg_config_library(LIBUSB libusb-1.0 QUIET) |