diff options
-rw-r--r-- | CMakeLists.txt | 22 | ||||
-rw-r--r-- | ConfigureChecks.cmake | 6 | ||||
-rw-r--r-- | cmakeconfig.h.in | 3 |
3 files changed, 20 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 175e278415..3ca9754f38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -751,6 +751,17 @@ endif() message(STATUS "C-Flags: ${CMAKE_C_FLAGS}") message(STATUS "CXX-Flags: ${CMAKE_CXX_FLAGS}") +if(APPLE) + # + # We assume that APPLE means OS X so that we have the OS X + # frameworks. + # + set(HAVE_OS_X_FRAMEWORKS 1) + FIND_LIBRARY (APPLE_APPLICATION_SERVICES_LIBRARY ApplicationServices) + FIND_LIBRARY (APPLE_CORE_FOUNDATION_LIBRARY CoreFoundation) + FIND_LIBRARY (APPLE_SYSTEM_CONFIGURATION_LIBRARY SystemConfiguration) +endif() + include(ConfigureChecks.cmake) #Big or little endian ? @@ -864,17 +875,6 @@ gmx_test_large_files(GMX_LARGEFILES) add_definitions( -DTOP_SRCDIR=\"${CMAKE_SOURCE_DIR}\" ) -if(APPLE) - # - # We assume that APPLE means OS X so that we have the OS X - # frameworks. - # - set(HAVE_OS_X_FRAMEWORKS 1) - FIND_LIBRARY (APPLE_APPLICATION_SERVICES_LIBRARY ApplicationServices) - FIND_LIBRARY (APPLE_CORE_FOUNDATION_LIBRARY CoreFoundation) - FIND_LIBRARY (APPLE_SYSTEM_CONFIGURATION_LIBRARY SystemConfiguration) -endif() - if(WIN32) set(WS_MSVC_NORETURN "__declspec(noreturn)") 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) diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in index 326818e086..7f1c91a5c9 100644 --- a/cmakeconfig.h.in +++ b/cmakeconfig.h.in @@ -183,6 +183,9 @@ /* Define to 1 if you have OS X frameworks */ #cmakedefine HAVE_OS_X_FRAMEWORKS 1 +/* Define to 1 if you have the OS X CFPropertyListCreateWithStream function */ +#cmakedefine HAVE_CFPROPERTYLISTCREATEWITHSTREAM 1 + /* Define if pcap_breakloop is known */ #cmakedefine HAVE_PCAP_BREAKLOOP 1 |