Skip to content
Permalink
Browse files

Merge pull request #42427 from 3nids/qt6-1

get cmake to pass for core only
  • Loading branch information
3nids committed Mar 24, 2021
2 parents 286fd20 + 0a69331 commit ac0c92763b21028a19309b78fa9e83a2f755f9ef
Showing with 15 additions and 18 deletions.
  1. +3 −2 i18n/CMakeLists.txt
  2. +12 −16 src/native/CMakeLists.txt
@@ -1,5 +1,5 @@
find_package(Qt5 COMPONENTS LinguistTools REQUIRED)
set(QT_LRELEASE_EXECUTABLE Qt5::lrelease)
find_package(${QT_VERSION_BASE} COMPONENTS LinguistTools REQUIRED)
set(QT_LRELEASE_EXECUTABLE ${QT_VERSION_BASE}::lrelease)

macro(ADD_TRANSLATION_FILES _sources )
foreach (_current_FILE ${ARGN})
@@ -22,6 +22,7 @@ endmacro(ADD_TRANSLATION_FILES)
# make sure the output directory exists
file(MAKE_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/i18n)


set(TS_FILES qgis_ar.ts qgis_bg.ts qgis_bs.ts qgis_ca.ts qgis_cs.ts qgis_da.ts qgis_de.ts qgis_el.ts qgis_es.ts qgis_et.ts qgis_eu.ts qgis_fi.ts qgis_fr.ts qgis_gl.ts qgis_hu.ts qgis_is.ts qgis_it.ts qgis_ja.ts qgis_ko.ts qgis_ky.ts qgis_lt.ts qgis_lv.ts qgis_nb.ts qgis_nl.ts qgis_pl.ts qgis_pt_BR.ts qgis_pt_PT.ts qgis_ro.ts qgis_ru.ts qgis_sc.ts qgis_sv.ts qgis_uk.ts qgis_vi.ts qgis_zh-Hans.ts qgis_zh-Hant.ts)

ADD_TRANSLATION_FILES (QM_FILES ${TS_FILES})
@@ -10,11 +10,7 @@ endif()
set(NATIVE_LINK_LIBS)

if(UNIX AND NOT APPLE AND NOT ANDROID)
if (WITH_QT6)
find_package(Qt6 COMPONENTS DBus REQUIRED)
else()
find_package(Qt5DBus REQUIRED)
endif()
find_package(${QT_VERSION_BASE} COMPONENTS DBus REQUIRED)
endif()

if(APPLE)
@@ -138,28 +134,28 @@ if(NOT ANDROID)
)
endif()

target_link_libraries(qgis_native
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
"${NATIVE_LINK_LIBS}"
)
if (WITH_QT6)
target_link_libraries(qgis_native ${Qt6Core_LIBRARIES} ${Qt6Gui_LIBRARIES} "${NATIVE_LINK_LIBS}")
else()
target_link_libraries(qgis_native ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} "${NATIVE_LINK_LIBS}")
endif()

if (UNIX AND NOT APPLE AND NOT ANDROID)
target_link_libraries(qgis_native Qt5::DBus)
target_link_libraries(qgis_native ${QT_VERSION_BASE}::DBus)
endif()

if (APPLE)
find_package(Qt5MacExtras)
find_package(${QT_VERSION_BASE}MacExtras)

target_link_libraries(qgis_native Qt5::MacExtras)
target_link_libraries(qgis_native ${QT_VERSION_BASE}::MacExtras)
endif()

if (MSVC)
find_package(Qt5WinExtras)
find_package(${QT_VERSION_BASE}WinExtras)

target_link_libraries(qgis_native shell32)
target_link_libraries(qgis_native ${Qt5Widget_LIBRARIES} ${QT_QTMAIN_LIBRARY})
target_link_libraries(qgis_native Qt5::WinExtras)
target_link_libraries(qgis_native ${${QT_VERSION_BASE}Widget_LIBRARIES} ${QT_QTMAIN_LIBRARY})
target_link_libraries(qgis_native ${QT_VERSION_BASE}::WinExtras)
endif()
# install

0 comments on commit ac0c927

Please sign in to comment.