diff --git a/SDKMacros.cmake b/SDKMacros.cmake
index 00f937c..5d75c9e 100644
--- a/SDKMacros.cmake
+++ b/SDKMacros.cmake
@@ -1,14 +1,15 @@
-macro(sdk_install _DIR _TARGET _H_FILES)
+macro(sdk_install _DIR _TARGET _H_FILES _QM_FILES)
if(LIB)
if(WIN32)
- if(NOT _H_FILES STREQUAL "")
+ if(NOT "x${_H_FILES}" STREQUAL "x")
#message("HFILES ${_H_FILES}")
install(FILES ${_H_FILES} DESTINATION ${MINGW_INCLUDE}/${_DIR})
endif()
qt_install(TARGETS ${_TARGET} DESTINATION ${MINGW_LIB})
qt_install(TARGETS ${_TARGET} DESTINATION ${MINGW_BIN})
qt_install(TARGETS ${_TARGET} DESTINATION QtBin)
+ qt_install(FILES ${_QM_FILES} DESTINATION QtLang)
else()
if (NOT _H_FILES STREQUAL "")
install(FILES ${_H_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${_DIR})
diff --git a/piqt/CMakeLists.txt b/piqt/CMakeLists.txt
index c741f01..b44861a 100644
--- a/piqt/CMakeLists.txt
+++ b/piqt/CMakeLists.txt
@@ -22,12 +22,15 @@ qt_target_link_libraries(${PROJECT_NAME} pip qad_utils qad_widgets)
message(STATUS "Building ${PROJECT_NAME}")
if(LIBPROJECT)
include(SDKMacros)
- sdk_install("pip" "${PROJECT_NAME}" "${out_HDR}")
+ sdk_install("pip" "${PROJECT_NAME}" "${out_HDR}" "${out_QM}")
else()
if(LIB)
if(WIN32)
set(CMAKE_INSTALL_PREFIX ${MINGW_DIR})
install(FILES ${out_HDR} DESTINATION ${MINGW_INCLUDE}/pip)
+ if(NOT "x${out_QM}" STREQUAL "x")
+ qt_install(FILES ${out_QM} DESTINATION QtLang)
+ endif()
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_LIB})
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
qt_install(TARGETS ${PROJECT_NAME} DESTINATION QtBin)
diff --git a/piqt_utils/CMakeLists.txt b/piqt_utils/CMakeLists.txt
index e0e1344..49c58d4 100644
--- a/piqt_utils/CMakeLists.txt
+++ b/piqt_utils/CMakeLists.txt
@@ -44,7 +44,7 @@ if (NOT DEFINED ENV{QNX_HOST})
endif()
if(LIBPROJECT)
- sdk_install("pip" "${PROJECT_NAME}" "${out_HDR}")
+ sdk_install("pip" "${PROJECT_NAME}" "${out_HDR}" "${out_QM}")
else()
if(LIB)
if(WIN32)
diff --git a/qad/CMakeLists.txt b/qad/CMakeLists.txt
index 1325e5b..09779d9 100644
--- a/qad/CMakeLists.txt
+++ b/qad/CMakeLists.txt
@@ -39,19 +39,21 @@ endif()
set(CMAKES "FindQAD.cmake" "QtWraps.cmake")
install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules)
-macro(qad_install _TARGET _H_FILES)
+macro(qad_install _TARGET _H_FILES _QM_FILES)
+ #message("qad_install ${_TARGET} ${_QM_FILES}")
if (LIBPROJECT)
- sdk_install("qad" "${_TARGET}" "${_H_FILES}")
+ sdk_install("qad" "${_TARGET}" "${_H_FILES}" "${_QM_FILES}")
else()
if (LIB)
if (WIN32)
- if (NOT _H_FILES STREQUAL "")
+ if(NOT "x${_H_FILES}" STREQUAL "x")
#message("HFILES ${_H_FILES}")
- install(FILES ${_H_FILES} DESTINATION ${MINGW_INCLUDE}/qad)
+ install(FILES ${_H_FILES} DESTINATION ${MINGW_INCLUDE}/${_DIR})
endif()
qt_install(TARGETS ${_TARGET} DESTINATION ${MINGW_LIB})
qt_install(TARGETS ${_TARGET} DESTINATION ${MINGW_BIN})
qt_install(TARGETS ${_TARGET} DESTINATION QtBin)
+ qt_install(FILES ${_QM_FILES} DESTINATION QtLang)
else()
if(NOT _H_FILES STREQUAL "")
install(FILES ${_H_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/qad)
@@ -84,10 +86,10 @@ macro(qad_project NAME _MODULES _LIBS)
set(PROJ_NAME qad_${NAME})
find_qt(${QtVersions} Core ${_MODULES})
qt_sources(SRC)
- qt_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM)
+ qt_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS ${PROJ_NAME}_QM)
qt_add_library(${PROJ_NAME} SHARED out_CPP)
qt_target_link_libraries(${PROJ_NAME} ${_LIBS})
- qad_install(${PROJ_NAME} "${out_HDR}")
+ qad_install(${PROJ_NAME} "${out_HDR}" ${PROJ_NAME}_QM)
message(STATUS "Building ${PROJ_NAME}")
if (NOT DEFINED ANDROID_PLATFORM)
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/plugin")
diff --git a/qad/QtWraps.cmake b/qad/QtWraps.cmake
index f7ce7dd..ff37865 100644
--- a/qad/QtWraps.cmake
+++ b/qad/QtWraps.cmake
@@ -433,11 +433,19 @@ endmacro()
# to corresponding Qt plugins directory
macro(qt_install)
set(_prev_inst)
+ #message("command: ${ARGN}")
foreach(_v ${_QT_VERSIONS_})
if (LOCAL_FOUND${_v})
set(_INST_LIST)
set(_IS_TARGET 0)
+ set(_IS_FILES 0)
set(_IS_DEST 0)
+ set(_IS_LANG 0)
+ foreach(_i ${ARGN})
+ if ("x${_i}" STREQUAL "xQtLang")
+ set(_IS_LANG 1)
+ endif()
+ endforeach()
foreach(_i ${ARGN})
if (_IS_TARGET)
set(_IS_TARGET 0)
@@ -447,31 +455,48 @@ macro(qt_install)
set(_INST_LIST ${_INST_LIST} ${_i})
endif()
else()
- if (_IS_DEST)
- set(_IS_DEST 0)
- if ("x${_i}" STREQUAL "xQtBin")
- set(_INST_LIST ${_INST_LIST} "${Qt${_v}_BIN}")
- else()
- if ("x${_i}" STREQUAL "xQtLang")
- set(_INST_LIST ${_INST_LIST} "${Qt${_v}_LANG_DIR}")
+ if (_IS_FILES)
+ set(_IS_FILES 0)
+ if (_IS_LANG)
+ if (("x${${_i}_Qt${_v}}" STREQUAL "x") OR ("x${_i}" STREQUAL "xDESTINATION"))
+ return()
else()
- set(_ind -1)
- string(FIND "${_i}" "QtPlugins" _ind)
- if (_ind GREATER_EQUAL 0)
- string(REPLACE "QtPlugins" "${Qt${_v}_PLUGINS_DIR}" _o "${_i}")
- set(_INST_LIST ${_INST_LIST} "${_o}")
- else()
- set(_INST_LIST ${_INST_LIST} ${_i})
- endif()
+ set(_INST_LIST ${_INST_LIST} ${${_i}_Qt${_v}})
endif()
+ else()
+ set(_INST_LIST ${_INST_LIST} ${_i})
endif()
else()
- set(_INST_LIST ${_INST_LIST} ${_i})
- if ("x${_i}" STREQUAL "xTARGETS")
- set(_IS_TARGET 1)
+ if (_IS_DEST)
+ set(_IS_DEST 0)
+ if ("x${_i}" STREQUAL "xQtBin")
+ set(_INST_LIST ${_INST_LIST} "${Qt${_v}_BIN}")
+ else()
+ if ("x${_i}" STREQUAL "xQtLang")
+ set(_INST_LIST ${_INST_LIST} "${Qt${_v}_LANG_DIR}")
+ else()
+ set(_ind -1)
+ string(FIND "${_i}" "QtPlugins" _ind)
+ if (_ind GREATER_EQUAL 0)
+ string(REPLACE "QtPlugins" "${Qt${_v}_PLUGINS_DIR}" _o "${_i}")
+ set(_INST_LIST ${_INST_LIST} "${_o}")
+ else()
+ set(_INST_LIST ${_INST_LIST} ${_i})
+ endif()
+ endif()
+ endif()
else()
- if ("x${_i}" STREQUAL "xDESTINATION")
- set(_IS_DEST 1)
+ set(_INST_LIST ${_INST_LIST} ${_i})
+ if ("x${_i}" STREQUAL "xTARGETS")
+ set(_IS_TARGET 1)
+ else()
+ if ("x${_i}" STREQUAL "xFILES")
+ set(_IS_FILES 1)
+ else()
+ if ("x${_i}" STREQUAL "xDESTINATION")
+ set(_IS_DEST 1)
+ endif()
+ endif()
endif()
endif()
endif()
diff --git a/qad/blockview/qad_blockview.qrc b/qad/blockview/qad_blockview.qrc
index 8a1aa10..40e80ca 100644
--- a/qad/blockview/qad_blockview.qrc
+++ b/qad/blockview/qad_blockview.qrc
@@ -1,53 +1,52 @@
-
- lang/qad_blockview_ru.qm
- ../icons/draw-line.png
- ../icons/align-hor.png
- ../icons/align-ver.png
- ../icons/dialog-close.png
- ../icons/edit-clear.png
- ../icons/edit-guides.png
- ../icons/view-grid.png
- ../icons/zoom-fit-best.png
- ../icons/configure.png
- ../icons/document-save.png
- ../icons/edit-clear-locationbar-rtl.png
- ../icons/edit-find.png
- ../icons/list-add.png
- ../icons/edit-delete.png
- ../icons/item.png
- ../icons/node-add.png
- ../icons/node.png
- ../icons/edit-copy.png
- ../icons/edit-paste.png
- ../icons/expand_s_x.png
- ../icons/expand_s_y.png
- ../icons/expand_x.png
- ../icons/expand_y.png
- ../icons/border-line.png
- ../icons/legend.png
- ../icons/blockview.png
- ../icons/view-fullscreen.png
- ../icons/draw-ellipse.png
- ../icons/draw-rectangle.png
- ../icons/draw-text.png
- ../icons/view-preview.png
- ../icons/format-fill-color.png
- ../icons/format-stroke-color.png
- ../icons/document-open.png
- ../icons/document-edit-.png
- ../icons/align-bottom-center.png
- ../icons/align-bottom-left.png
- ../icons/align-bottom-right.png
- ../icons/align-center-center.png
- ../icons/align-center-left.png
- ../icons/align-center-right.png
- ../icons/align-top-center.png
- ../icons/align-top-left.png
- ../icons/align-top-right.png
- ../icons/z-bottom.png
- ../icons/z-down.png
- ../icons/z-top.png
- ../icons/z-up.png
-
+
+ ../icons/draw-line.png
+ ../icons/align-hor.png
+ ../icons/align-ver.png
+ ../icons/dialog-close.png
+ ../icons/edit-clear.png
+ ../icons/edit-guides.png
+ ../icons/view-grid.png
+ ../icons/zoom-fit-best.png
+ ../icons/configure.png
+ ../icons/document-save.png
+ ../icons/edit-clear-locationbar-rtl.png
+ ../icons/edit-find.png
+ ../icons/list-add.png
+ ../icons/edit-delete.png
+ ../icons/item.png
+ ../icons/node-add.png
+ ../icons/node.png
+ ../icons/edit-copy.png
+ ../icons/edit-paste.png
+ ../icons/expand_s_x.png
+ ../icons/expand_s_y.png
+ ../icons/expand_x.png
+ ../icons/expand_y.png
+ ../icons/border-line.png
+ ../icons/legend.png
+ ../icons/blockview.png
+ ../icons/view-fullscreen.png
+ ../icons/draw-ellipse.png
+ ../icons/draw-rectangle.png
+ ../icons/draw-text.png
+ ../icons/view-preview.png
+ ../icons/format-fill-color.png
+ ../icons/format-stroke-color.png
+ ../icons/document-open.png
+ ../icons/document-edit-.png
+ ../icons/align-bottom-center.png
+ ../icons/align-bottom-left.png
+ ../icons/align-bottom-right.png
+ ../icons/align-center-center.png
+ ../icons/align-center-left.png
+ ../icons/align-center-right.png
+ ../icons/align-top-center.png
+ ../icons/align-top-left.png
+ ../icons/align-top-right.png
+ ../icons/z-bottom.png
+ ../icons/z-down.png
+ ../icons/z-top.png
+ ../icons/z-up.png
+
diff --git a/qad/graphic/qad_graphic.qrc b/qad/graphic/qad_graphic.qrc
index 4deb98b..89e779c 100644
--- a/qad/graphic/qad_graphic.qrc
+++ b/qad/graphic/qad_graphic.qrc
@@ -1,32 +1,31 @@
-
- lang/qad_graphic_ru.qm
- ../icons/media-playback-pause.png
- ../icons/dialog-close.png
- ../icons/edit-clear.png
- ../icons/edit-guides.png
- ../icons/view-grid.png
- ../icons/zoom-fit-best.png
- ../icons/configure.png
- ../icons/document-save.png
- ../icons/edit-clear-locationbar-rtl.png
- ../icons/edit-find.png
- ../icons/list-add.png
- ../icons/edit-delete.png
- ../icons/item.png
- ../icons/node-add.png
- ../icons/node.png
- ../icons/edit-copy.png
- ../icons/edit-paste.png
- ../icons/expand_s_x.png
- ../icons/expand_s_y.png
- ../icons/expand_x.png
- ../icons/expand_y.png
- ../icons/border-line.png
- ../icons/legend.png
- ../icons/graphic.png
- ../icons/view-fullscreen.png
- ../icons/pause-back.png
- ../icons/pause-front.png
+
+ ../icons/media-playback-pause.png
+ ../icons/dialog-close.png
+ ../icons/edit-clear.png
+ ../icons/edit-guides.png
+ ../icons/view-grid.png
+ ../icons/zoom-fit-best.png
+ ../icons/configure.png
+ ../icons/document-save.png
+ ../icons/edit-clear-locationbar-rtl.png
+ ../icons/edit-find.png
+ ../icons/list-add.png
+ ../icons/edit-delete.png
+ ../icons/item.png
+ ../icons/node-add.png
+ ../icons/node.png
+ ../icons/edit-copy.png
+ ../icons/edit-paste.png
+ ../icons/expand_s_x.png
+ ../icons/expand_s_y.png
+ ../icons/expand_x.png
+ ../icons/expand_y.png
+ ../icons/border-line.png
+ ../icons/legend.png
+ ../icons/graphic.png
+ ../icons/view-fullscreen.png
+ ../icons/pause-back.png
+ ../icons/pause-front.png
diff --git a/qcd_utils/CMakeLists.txt b/qcd_utils/CMakeLists.txt
index f04d670..bfb2cac 100644
--- a/qcd_utils/CMakeLists.txt
+++ b/qcd_utils/CMakeLists.txt
@@ -21,7 +21,7 @@ qt_add_library(${PROJECT_NAME} SHARED out_CPP)
qt_target_link_libraries(${PROJECT_NAME} pip qad_utils qad_widgets cd_utils piqt)
message(STATUS "Building ${PROJECT_NAME}")
if(LIBPROJECT)
- sdk_install("" "${PROJECT_NAME}" "${out_HDR}")
+ sdk_install("" "${PROJECT_NAME}" "${out_HDR}" "${out_QM}")
else()
if(LIB)
if(WIN32)
diff --git a/qglview/CMakeLists.txt b/qglview/CMakeLists.txt
index 82679a4..b213d6c 100644
--- a/qglview/CMakeLists.txt
+++ b/qglview/CMakeLists.txt
@@ -25,7 +25,7 @@ qt_add_library(${PROJECT_NAME} SHARED out_CPP)
qt_target_link_libraries(${PROJECT_NAME} qad_utils qad_widgets ${OPENGL_LIBRARIES})
message(STATUS "Building ${PROJECT_NAME}")
if (LIBPROJECT)
- sdk_install("qad" "${PROJECT_NAME}" "${out_HDR}")
+ sdk_install("qad" "${PROJECT_NAME}" "${out_HDR}" "${out_QM}")
else()
if (LIB)
if (WIN32)