summaryrefslogtreecommitdiff
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorDavid Ameiss <netshark@ameissnet.com>2014-11-10 14:24:18 -0600
committerStig Bjørlykke <stig@bjorlykke.org>2014-11-10 22:03:26 +0000
commitafae2b64e2aab4d63ccef3c652507e747594ea93 (patch)
tree4f237286a5d8828abcb58c62b2650fb38729026e /ConfigureChecks.cmake
parentc44ff776c4d270a8ae1d2fea39eae8c0a14d9dd9 (diff)
downloadwireshark-afae2b64e2aab4d63ccef3c652507e747594ea93.tar.gz
Allow building under OSX Yosemite using cmake.
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 <stig@bjorlykke.org> Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake6
1 files changed, 6 insertions, 0 deletions
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)