From: Michihiro NAKAJIMA Date: Sat, 7 May 2011 12:49:28 +0000 (-0400) Subject: On Mac OS, Link CoreFoundation to avoid build failure. X-Git-Tag: v3.0.0a~400 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3def082ccafecfa0011006bb86ee3bf797399d88;p=thirdparty%2Flibarchive.git On Mac OS, Link CoreFoundation to avoid build failure. SVN-Revision: 3286 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 30aa8d33a..a5572c4fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1031,6 +1031,11 @@ IF(MSVC) ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE) ENDIF(MSVC) +# We need CoreFoundation on Mac OS. +IF(APPLE) + LIST(APPEND ADDITIONAL_LIBS "-framework CoreFoundation") +ENDIF(APPLE) + IF(ENABLE_TEST) ADD_CUSTOM_TARGET(run_all_tests) ENDIF(ENABLE_TEST) diff --git a/configure.ac b/configure.ac index 1726b52a4..661e3d812 100644 --- a/configure.ac +++ b/configure.ac @@ -191,6 +191,13 @@ case $host in ;; esac +# We need CoreFoundation on Mac OS. +case $host in + *darwin* ) + LIBS="${LIBS} -framework CoreFoundation" + ;; +esac + # Checks for header files. AC_HEADER_DIRENT AC_HEADER_SYS_WAIT