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>
This commit is contained in:
Guy Harris 2014-06-24 00:07:38 -07:00
parent 4f1d20abae
commit dbd409d041
3 changed files with 30 additions and 0 deletions

View File

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

View File

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

View File

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