mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 10:56:11 +00:00
Build system compatiblity with QT6.
Qt6 moved some of the functionality to separate modules.
This commit is contained in:
parent
4328f5df5a
commit
da17c6e411
@ -61,7 +61,11 @@ if (CUTTER_QT6)
|
||||
else()
|
||||
set(QT_PREFIX Qt5)
|
||||
endif()
|
||||
|
||||
find_package(${QT_PREFIX} REQUIRED COMPONENTS Core Widgets Gui Svg Network)
|
||||
if (CUTTER_QT6)
|
||||
find_package(${QT_PREFIX} REQUIRED COMPONENTS Core5Compat SvgWidgets OpenGLWidgets)
|
||||
endif()
|
||||
|
||||
if(CUTTER_ENABLE_PYTHON)
|
||||
find_package(PythonInterp REQUIRED)
|
||||
|
@ -20,8 +20,13 @@ set(TS_FILES
|
||||
# translations/pt-BR/cutter_pt.ts #2321 handling multiple versions of a language
|
||||
|
||||
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/translations)
|
||||
find_package(Qt5LinguistTools REQUIRED)
|
||||
qt5_add_translation(qmFiles ${TS_FILES})
|
||||
if (CUTTER_QT6)
|
||||
find_package(Qt6LinguistTools REQUIRED)
|
||||
qt6_add_translation(qmFiles ${TS_FILES})
|
||||
else()
|
||||
find_package(Qt5LinguistTools REQUIRED)
|
||||
qt5_add_translation(qmFiles ${TS_FILES})
|
||||
endif()
|
||||
add_custom_target(translations ALL DEPENDS ${qmFiles} SOURCES ${TS_FILES})
|
||||
|
||||
install(FILES
|
||||
|
@ -459,6 +459,11 @@ if(CUTTER_ENABLE_CRASH_REPORTS)
|
||||
endif()
|
||||
|
||||
target_link_libraries(Cutter PUBLIC ${QT_PREFIX}::Core ${QT_PREFIX}::Widgets ${QT_PREFIX}::Gui PRIVATE ${QT_PREFIX}::Svg ${QT_PREFIX}::Network)
|
||||
if (CUTTER_QT6)
|
||||
target_link_libraries(Cutter PUBLIC Qt6::Core5Compat Qt6::SvgWidgets)
|
||||
target_link_libraries(Cutter PRIVATE Qt6::OpenGLWidgets)
|
||||
endif()
|
||||
|
||||
target_link_libraries(Cutter PUBLIC ${RIZIN_TARGET})
|
||||
if(CUTTER_ENABLE_PYTHON)
|
||||
if (WIN32)
|
||||
|
Loading…
Reference in New Issue
Block a user