From: James Turner Date: Wed, 12 Jun 2013 20:11:43 +0000 (+0200) Subject: Use CoreServices, not Cocoa, for FSFindFolder X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b4526f926d71a69cc612ba68852a6f7780210479;p=simgear.git Use CoreServices, not Cocoa, for FSFindFolder --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b77576cd..f25cf760 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -168,6 +168,10 @@ if (MSVC AND MSVC_3RDPARTY_ROOT) set (OPENAL_LIBRARY_DIR ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/lib) endif (MSVC AND MSVC_3RDPARTY_ROOT) +if(APPLE) + find_library(CORE_SERVICES_LIBRARY CoreServices) +endif() + find_package(Boost REQUIRED) set (BOOST_CXX_FLAGS "-DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DBOOST_BIMAP_DISABLE_SERIALIZATION") @@ -378,11 +382,8 @@ if(ENABLE_TESTS) ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARY} ${WINSOCK_LIBRARY} - ${RT_LIBRARY}) - if(APPLE) - find_library(COCOA_LIBRARY Cocoa) - list(APPEND TEST_LIBS ${COCOA_LIBRARY}) - endif() + ${RT_LIBRARY} + ${CORE_SERVICES_LIBRARY}) endif() if(NOT SIMGEAR_HEADLESS) diff --git a/simgear/CMakeLists.txt b/simgear/CMakeLists.txt index ca49747a..096d0180 100644 --- a/simgear/CMakeLists.txt +++ b/simgear/CMakeLists.txt @@ -66,7 +66,8 @@ if(SIMGEAR_SHARED) target_link_libraries(SimGearCore ${ZLIB_LIBRARY} ${RT_LIBRARY} ${LibArchive_LIBRARIES} ${EXPAT_LIBRARIES} - ${CMAKE_THREAD_LIBS_INIT}) + ${CMAKE_THREAD_LIBS_INIT} + ${CORE_SERVICES_LIBRARY}) if(LIBSVN_FOUND) target_link_libraries(SimGearCore ${LIBSVN_LIBRARIES})