summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-06-24 00:07:38 -0700
committerGuy Harris <guy@alum.mit.edu>2014-06-24 07:10:12 +0000
commitdbd409d0410dff7f5d4b6bdd7f16d286accf01a5 (patch)
tree5bc4396291b94f38ee956c714cb0a8328bb6d2b3
parent4f1d20abae2c485bf0cdcaee10a917e4e01ebda1 (diff)
downloadwireshark-dbd409d0410dff7f5d4b6bdd7f16d286accf01a5.tar.gz
Fix OS X CMake build.
I have ***NO*** idea why this makes a difference, but, without this change, APPLE_CORE_FOUNDATION_LIBRARY is apparently *not* set correctly for wsutil/CMakeLists.txt, and, with this change, it is. I guess there's something magic involved here with "global" CMake variables or something crazy such as that. Change-Id: I7a0046b9c249568cd666720838104f48e854e203 Reviewed-on: https://code.wireshark.org/review/2612 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--Makefile.am1
-rw-r--r--cmake/modules/FindOS_X_FRAMEWORKS.cmake21
-rw-r--r--wsutil/CMakeLists.txt8
3 files changed, 30 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 6b4d192bf8..741df08e33 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1010,6 +1010,7 @@ EXTRA_DIST = \
cmake/modules/FindLUA.cmake \
cmake/modules/FindLYNX.cmake \
cmake/modules/FindM.cmake \
+ cmake/modules/FindOS_X_FRAMEWORKS.cmake \
cmake/modules/FindPCAP.cmake \
cmake/modules/FindPOD.cmake \
cmake/modules/FindPORTAUDIO.cmake \
diff --git a/cmake/modules/FindOS_X_FRAMEWORKS.cmake b/cmake/modules/FindOS_X_FRAMEWORKS.cmake
new file mode 100644
index 0000000000..74abccc411
--- /dev/null
+++ b/cmake/modules/FindOS_X_FRAMEWORKS.cmake
@@ -0,0 +1,21 @@
+#
+# - Find OS X frameworks
+# Find various OS X frameworks if we're on OS X
+#
+# APPLE_APPLICATION_SERVICES_LIBRARY - ApplicationServices framework
+# APPLE_CORE_FOUNDATION_LIBRARY - CoreFoundation frameowkr
+# APPLE_SYSTEM_CONFIGURATION_LIBRARY - SystemConfiguration framework
+# HAVE_OS_X_FRAMEWORKS - True if we're on OS X
+
+
+if(APPLE)
+ #
+ # We assume that APPLE means OS X so that we have the OS X
+ # frameworks.
+ #
+ set(HAVE_OS_X_FRAMEWORKS 1)
+ set(OS_X_FRAMEWORKS_FOUND TRUE)
+ FIND_LIBRARY (APPLE_APPLICATION_SERVICES_LIBRARY ApplicationServices)
+ FIND_LIBRARY (APPLE_CORE_FOUNDATION_LIBRARY CoreFoundation)
+ FIND_LIBRARY (APPLE_SYSTEM_CONFIGURATION_LIBRARY SystemConfiguration)
+endif()
diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt
index 2c80a56c17..0157e74785 100644
--- a/wsutil/CMakeLists.txt
+++ b/wsutil/CMakeLists.txt
@@ -93,6 +93,14 @@ set(WSUTIL_FILES
${WSUTIL_SSE42_FILES}
)
+if(APPLE)
+ #
+ # We assume that APPLE means OS X so that we have the OS X
+ # frameworks.
+ #
+ FIND_LIBRARY (APPLE_CORE_FOUNDATION_LIBRARY CoreFoundation)
+endif()
+
set(wsutil_LIBS
${APPLE_CORE_FOUNDATION_LIBRARY}
${GMODULE2_LIBRARIES}