From afae2b64e2aab4d63ccef3c652507e747594ea93 Mon Sep 17 00:00:00 2001 From: David Ameiss Date: Mon, 10 Nov 2014 14:24:18 -0600 Subject: Allow building under OSX Yosemite using cmake. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CFPropertyListCreateFromStream() has been deprecated in Yosemite, in favor of CFPropertyListCreateWithStream(). The autotools build checks for the existence of the new function, but the cmake build does not. So, add a check for it to CMakeLists.txt, and update cmakeconfig.h.in to provide the "template" for HAVE_CFPROPERTYLISTCREATEWITHSTREAM. Change-Id: I1a4e3e1ce83092ecf7725527b921eeca80b18d4b Note: CFPropertyListCreateWithStream() works under Mavericks as well. Reviewed-on: https://code.wireshark.org/review/5226 Reviewed-by: Stig Bjørlykke Tested-by: Stig Bjørlykke --- ConfigureChecks.cmake | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ConfigureChecks.cmake') diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 010187237c..0919b98514 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -93,6 +93,12 @@ check_function_exists("setresgid" HAVE_SETRESGID) check_function_exists("setresuid" HAVE_SETRESUID) check_function_exists("strptime" HAVE_STRPTIME) check_function_exists("sysconf" HAVE_SYSCONF) +if (APPLE) + cmake_push_check_state() + set(CMAKE_REQUIRED_LIBRARIES ${APPLE_CORE_FOUNDATION_LIBRARY}) + check_function_exists("CFPropertyListCreateWithStream" HAVE_CFPROPERTYLISTCREATEWITHSTREAM) + cmake_pop_check_state() +endif() #Struct members include(CheckStructHasMember) -- cgit v1.2.1