From ccfdd6deecf9e471016a3c52d58a0e4fbe2a4b61 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 23 Oct 2017 11:48:43 -0400 Subject: 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 --- CMakeLists.txt | 11 ++++++++--- 1 file 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) -- cgit v1.2.3-70-g09d2