mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-19 19:53:53 +00:00
Merge branch 'macos_fix_qt56' into 'master'
macos qt 5/6 fix See merge request OpenMW/openmw!2691
This commit is contained in:
commit
0922e5145c
2 changed files with 9 additions and 10 deletions
|
@ -236,14 +236,13 @@ find_package(OpenGL REQUIRED)
|
|||
find_package(LZ4 REQUIRED)
|
||||
|
||||
if (USE_QT)
|
||||
find_package(Qt5 5.15 COMPONENTS Core Widgets Network OpenGL)
|
||||
if (Qt5_FOUND)
|
||||
message(STATUS "Using Qt5")
|
||||
find_package(QT REQUIRED COMPONENTS Core NAMES Qt6 Qt5)
|
||||
if (QT_VERSION_MAJOR VERSION_EQUAL 5)
|
||||
find_package(Qt5 5.15 COMPONENTS Core Widgets Network OpenGL REQUIRED)
|
||||
else()
|
||||
find_package(Qt6 6.4 COMPONENTS Core Widgets Network OpenGL REQUIRED)
|
||||
message(STATUS "Using Qt6")
|
||||
message(STATUS "Warning: Qt6 support is experimental and incomplete")
|
||||
find_package(Qt6 COMPONENTS Core Widgets Network OpenGL REQUIRED)
|
||||
endif()
|
||||
message(STATUS "Using Qt${QT_VERSION}")
|
||||
endif()
|
||||
|
||||
set(USED_OSG_COMPONENTS
|
||||
|
@ -819,13 +818,13 @@ if (OPENMW_OSX_DEPLOYMENT AND APPLE)
|
|||
message(FATAL_ERROR "macOS packaging requires CMake 3.19 or higher to sign macOS app bundles.")
|
||||
endif ()
|
||||
|
||||
get_property(QT_COCOA_PLUGIN_PATH TARGET Qt::QCocoaIntegrationPlugin PROPERTY LOCATION_RELEASE)
|
||||
get_property(QT_COCOA_PLUGIN_PATH TARGET Qt${QT_VERSION_MAJOR}::QCocoaIntegrationPlugin PROPERTY LOCATION_RELEASE)
|
||||
get_filename_component(QT_COCOA_PLUGIN_DIR "${QT_COCOA_PLUGIN_PATH}" DIRECTORY)
|
||||
get_filename_component(QT_COCOA_PLUGIN_GROUP "${QT_COCOA_PLUGIN_DIR}" NAME)
|
||||
get_filename_component(QT_COCOA_PLUGIN_NAME "${QT_COCOA_PLUGIN_PATH}" NAME)
|
||||
configure_file("${QT_COCOA_PLUGIN_PATH}" "${APP_BUNDLE_DIR}/Contents/PlugIns/${QT_COCOA_PLUGIN_GROUP}/${QT_COCOA_PLUGIN_NAME}" COPYONLY)
|
||||
|
||||
get_property(QT_QMACSTYLE_PLUGIN_PATH TARGET Qt::QMacStylePlugin PROPERTY LOCATION_RELEASE)
|
||||
get_property(QT_QMACSTYLE_PLUGIN_PATH TARGET Qt${QT_VERSION_MAJOR}::QMacStylePlugin PROPERTY LOCATION_RELEASE)
|
||||
get_filename_component(QT_QMACSTYLE_PLUGIN_DIR "${QT_QMACSTYLE_PLUGIN_PATH}" DIRECTORY)
|
||||
get_filename_component(QT_QMACSTYLE_PLUGIN_GROUP "${QT_QMACSTYLE_PLUGIN_DIR}" NAME)
|
||||
get_filename_component(QT_QMACSTYLE_PLUGIN_NAME "${QT_QMACSTYLE_PLUGIN_PATH}" NAME)
|
||||
|
|
2
extern/osgQt/CMakeLists.txt
vendored
2
extern/osgQt/CMakeLists.txt
vendored
|
@ -8,7 +8,7 @@ set(OSGQT_SOURCE_FILES
|
|||
|
||||
add_library(${OSGQT_LIBRARY} STATIC ${OSGQT_SOURCE_FILES})
|
||||
|
||||
target_link_libraries(${OSGQT_LIBRARY} Qt5::Core Qt5::OpenGL)
|
||||
target_link_libraries(${OSGQT_LIBRARY} Qt::Core Qt::OpenGL)
|
||||
|
||||
link_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
|
|
Loading…
Reference in a new issue