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>
This commit is contained in:
Dirk Hohndel 2017-10-23 11:48:43 -04:00
parent d839392bb6
commit ccfdd6deec

View file

@ -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)