diff --git a/core/macosx/CMakeLists.txt b/core/macosx/CMakeLists.txt index b959a1ea02409..e3e38e959316f 100644 --- a/core/macosx/CMakeLists.txt +++ b/core/macosx/CMakeLists.txt @@ -12,8 +12,9 @@ if(NOT APPLE) return() endif() +find_library(CORESYMBOLICATION_FRAMEWORK CoreSymbolication PATHS "${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks" REQUIRED) target_link_libraries(Core PRIVATE - "-F/System/Library/PrivateFrameworks -framework CoreSymbolication" + ${CORESYMBOLICATION_FRAMEWORK} ) if(cocoa) @@ -21,7 +22,8 @@ if(cocoa) target_include_directories(Core PRIVATE inc) - target_link_libraries(Core PRIVATE "-framework Cocoa") + find_library(COCOA_FRAMEWORK Cocoa REQUIRED) + target_link_libraries(Core PRIVATE ${COCOA_FRAMEWORK}) ROOT_OBJECT_LIBRARY(Macosx src/CocoaUtils.mm diff --git a/graf2d/cocoa/CMakeLists.txt b/graf2d/cocoa/CMakeLists.txt index a1c7db7a14d77..3bdce5e3558a2 100644 --- a/graf2d/cocoa/CMakeLists.txt +++ b/graf2d/cocoa/CMakeLists.txt @@ -9,6 +9,9 @@ # @author Pere Mato, CERN ############################################################################ +find_library(COCOA_FRAMEWORK Cocoa REQUIRED) +find_library(OPENGL_FRAMEWORK OpenGL REQUIRED) + ROOT_STANDARD_LIBRARY_PACKAGE(GCocoa HEADERS TGCocoa.h @@ -36,8 +39,8 @@ ROOT_STANDARD_LIBRARY_PACKAGE(GCocoa Gui LIBRARIES GQuartz - "-framework Cocoa" - "-framework OpenGL" + ${COCOA_FRAMEWORK} + ${OPENGL_FRAMEWORK} ${FREETYPE_LIBRARIES} ) diff --git a/graf2d/quartz/CMakeLists.txt b/graf2d/quartz/CMakeLists.txt index df828cfddee6e..22966233e6144 100644 --- a/graf2d/quartz/CMakeLists.txt +++ b/graf2d/quartz/CMakeLists.txt @@ -11,6 +11,8 @@ add_definitions("-ObjC++") +find_library(COCOA_FRAMEWORK Cocoa REQUIRED) + # Dictionary not needed. ROOT_LINKER_LIBRARY(GQuartz src/QuartzFillArea.mm @@ -19,7 +21,7 @@ ROOT_LINKER_LIBRARY(GQuartz src/QuartzText.mm src/QuartzUtils.mm LIBRARIES - "-framework Cocoa" + ${COCOA_FRAMEWORK} DEPENDENCIES Core MathCore diff --git a/gui/cefdisplay/CMakeLists.txt b/gui/cefdisplay/CMakeLists.txt index e940d58c4c2ab..32f2ad2c131e4 100644 --- a/gui/cefdisplay/CMakeLists.txt +++ b/gui/cefdisplay/CMakeLists.txt @@ -23,7 +23,8 @@ if(ROOT_ARCHITECTURE MATCHES macosx) set(CEF_platform src/gui_handler_mac.mm) set(CEF_RELEASE_DIR ${CEF_root}/Release/Chromium\ Embedded\ Framework.framework) set(CEF_LIBRARY ${CEF_RELEASE_DIR}/Chromium\ Embedded\ Framework) - set(CEF_LIB_DEPENDENCY "-framework Foundation") + find_library(FOUNDATION_FRAMEWORK Foundation REQUIRED) + set(CEF_LIB_DEPENDENCY ${FOUNDATION_FRAMEWORK}) set(CEF_DLL_WRAPPER ${CEF_root}/build/libcef_dll_wrapper/libcef_dll_wrapper.a) file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Frameworks/Chromium\ Embedded\ Framework.framework) file(COPY ${CEF_RELEASE_DIR} DESTINATION ${CMAKE_BINARY_DIR}/Frameworks/)