Skip to content

Commit

Permalink
Swap order
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer authored Dec 20, 2022
1 parent 4f60461 commit 881000c
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1483,23 +1483,6 @@ if(MSVC)
)
endif()

if(APPLE OR WIN32)
# qt_de.qm is just one arbitrary file in the directory that needs to be located;
# there is no particular reason to look for this file versus any other one in the directory.
set(CMAKE_FIND_DEBUG_MODE TRUE)
find_file(QT_TRANSLATION_FILE qt_de.qm PATHS "${Qt5_DIR}/../../../translations" "${Qt5_DIR}/../../qt5/translations" REQUIRED NO_DEFAULT_PATH)
set(CMAKE_FIND_DEBUG_MODE FALSE)
get_filename_component(QT_TRANSLATIONS ${QT_TRANSLATION_FILE} DIRECTORY)
install(
DIRECTORY "${QT_TRANSLATIONS}"
DESTINATION "${MIXXX_INSTALL_DATADIR}"
# QT 5 translations have been separated into several files, and most of the qt_xx.qm files
# contain just shortcuts to load the qtbase, qtmultimedia etc files.
FILES_MATCHING REGEX
"qt_.+\.qm|qtbase_.*\.qm|qtmultimedia_.*\.qm|qtscript_.*\.qm|qtxmlpatterns_.*\.qm"
)
endif()

if(WIN32)
# Qt 5 loads these ANGLE DLLs at runtime if the graphics driver is blocklisted.
# Qt does not link these and vcpkg does not build them as a dependency of Qt,
Expand Down Expand Up @@ -2177,6 +2160,21 @@ elseif(WIN32)
endif()
endif()

if(APPLE OR WIN32)
# qt_de.qm is just one arbitrary file in the directory that needs to be located;
# there is no particular reason to look for this file versus any other one in the directory.
find_file(QT_TRANSLATION_FILE qt_de.qm PATHS "${Qt5_DIR}/../../../translations" "${Qt5_DIR}/../../qt5/translations" REQUIRED NO_DEFAULT_PATH)
get_filename_component(QT_TRANSLATIONS ${QT_TRANSLATION_FILE} DIRECTORY)
install(
DIRECTORY "${QT_TRANSLATIONS}"
DESTINATION "${MIXXX_INSTALL_DATADIR}"
# QT 5 translations have been separated into several files, and most of the qt_xx.qm files
# contain just shortcuts to load the qtbase, qtmultimedia etc files.
FILES_MATCHING REGEX
"qt_.+\.qm|qtbase_.*\.qm|qtmultimedia_.*\.qm|qtscript_.*\.qm|qtxmlpatterns_.*\.qm"
)
endif()

# QtScriptByteArray
add_library(QtScriptByteArray STATIC EXCLUDE_FROM_ALL
lib/qtscript-bytearray/bytearrayclass.cpp
Expand Down

0 comments on commit 881000c

Please sign in to comment.