| 27 | | |
| 28 | | if (MSVC) |
| 29 | | string(REGEX REPLACE "\\\\" "/" QTDIR $ENV{QTDIR}) |
| 30 | | string(REGEX REPLACE "\\\\" "/" QT_PLUGINS_DIR ${QT_PLUGINS_DIR}) |
| 31 | | |
| 32 | | if (CMAKE_BUILD_TYPE MATCHES Debug) |
| 33 | | ow_copy_file(${QTDIR}/bin/QtGuid4.dll ${BUILD_DIR}) |
| 34 | | #${BUILD_DIR}/imageformats/qmngd1.dll first then it creates imageformats directory |
| 35 | | ow_copy_file(${QT_PLUGINS_DIR}/imageformats/qmngd1.dll ${BUILD_DIR}/imageformats/qmngd1.dll) |
| 36 | | ow_copy_file(${QT_PLUGINS_DIR}/imageformats/qjpegd1.dll ${BUILD_DIR}/imageformats) |
| 37 | | ow_copy_file(${CMAKE_CURRENT_SOURCE_DIR}/binary-lib/msvc/imageformats/qgifd1.dll ${BUILD_DIR}/imageformats) |
| 38 | | else (CMAKE_BUILD_TYPE MATCHES Debug) |
| 39 | | ow_copy_file(${QTDIR}/bin/QtGui4.dll ${BUILD_DIR}) |
| 40 | | #${BUILD_DIR}/imageformats/qmng1.dll first then it creates imageformats directory |
| 41 | | ow_copy_file(${QT_PLUGINS_DIR}/imageformats/qmng1.dll ${BUILD_DIR}/imageformats/qmng1.dll) |
| 42 | | ow_copy_file(${QT_PLUGINS_DIR}/imageformats/qjpeg1.dll ${BUILD_DIR}/imageformats) |
| 43 | | ow_copy_file(${CMAKE_CURRENT_SOURCE_DIR}/binary-lib/msvc/imageformats/qgif1.dll ${BUILD_DIR}/imageformats) |
| 44 | | endif (CMAKE_BUILD_TYPE MATCHES Debug) |
| 45 | | endif (MSVC) |
| 46 | | |
| 47 | | if (LINUX) |
| 48 | | if (CMAKE_BUILD_TYPE MATCHES Debug) |
| 49 | | set(suffix "_debug") |
| 50 | | else (CMAKE_BUILD_TYPE MATCHES Debug) |
| 51 | | set(suffix "") |
| 52 | | endif (CMAKE_BUILD_TYPE MATCHES Debug) |
| 53 | | |
| 54 | | file(GLOB pluginList "${QT_PLUGINS_DIR}/imageformats/*${suffix}.so") |
| 55 | | foreach(pluginPath ${pluginList}) |
| 56 | | get_filename_component(pluginName "${pluginPath}" NAME) |
| 57 | | ow_copy_file(${pluginPath} ${BUILD_DIR}/imageformats/${pluginName}) |
| 58 | | endforeach(pluginPath) |
| 59 | | endif (LINUX) |
| 60 | | |
| 61 | | # Copy Qt translations |
| 62 | | exec_program(${QT_QMAKE_EXECUTABLE} |
| 63 | | ARGS "-query QT_INSTALL_TRANSLATIONS" |
| 64 | | OUTPUT_VARIABLE QT_INSTALL_TRANSLATIONS) |
| 65 | | |
| 66 | | string(REGEX REPLACE "\\\\" "/" QT_INSTALL_TRANSLATIONS ${QT_INSTALL_TRANSLATIONS}) |
| 67 | | |
| 68 | | ow_copy_dir(${QT_INSTALL_TRANSLATIONS}/*.qm ${LOCALE_COPY_DIR}/.) |