moved to shstk

This commit is contained in:
2020-08-25 22:24:02 +03:00
parent d4f1c78a6e
commit b92a1fa558
904 changed files with 2448 additions and 36452 deletions

View File

@@ -1,40 +0,0 @@
cmake_minimum_required(VERSION 3.0)
cmake_policy(SET CMP0017 NEW) # need include() with .cmake
project(qad)
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
if (NOT DEFINED ANDROID_PLATFORM)
find_package(OpenGL REQUIRED)
endif()
if (MINGW)
find_package(MinGW REQUIRED)
endif()
# Version
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/qad_version.h")
file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/qad_version.h")
endif()
#message(STATUS "Building QAD version ${QAD_VERSION} (${QAD_LIB_TYPE})")
file(GLOB CMAKES "cmake/*.cmake" "cmake/*.in")
if (LIB)
install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules)
if (WIN32)
install(FILES ${QAD_VERSION_FILE} DESTINATION ${MINGW_INCLUDE}/qad)
else()
install(FILES ${QAD_VERSION_FILE} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/qad)
endif()
else()
install(FILES ${QAD_VERSION_FILE} DESTINATION include/qad)
endif()
add_subdirectory(libs)
if (UTILS)
add_subdirectory(utils)
endif()
copy_to_parent(qad_includes)

View File

@@ -1,165 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

View File

@@ -1,172 +0,0 @@
#[[
Also create imported targets:
* QAD::Utils
* QAD::Widgets
* QAD::Application
* QAD::Blockview
* QAD::Graphic
* QAD::SQLTable
* QAD::TouchWidgets
* QAD::Doc
These targets include directories and dependencies
]]
cmake_policy(SET CMP0011 NEW) # don`t affect includer policies
cmake_policy(SET CMP0020 NEW) # Automatically link Qt executables to qtmain target on Windows
if(NOT LIBPROJECT)
include(QtWraps)
endif()
get_directory_property(hasParent PARENT_DIRECTORY)
set(_SEARCH_DIR)
if(WIN32)
find_package(MinGW REQUIRED)
endif()
set(_QAD_INCDIR)
set(_QAD_LIBDIR)
if(MINGW_INCLUDE)
list(APPEND _QAD_INCDIR "${MINGW_INCLUDE}/qad")
list(APPEND _QAD_LIBDIR "${MINGW_LIB}")
endif()
if(CMAKE_CROSSCOMPILING)
list(APPEND _QAD_INCDIR "${CMAKE_PREFIX_PATH}/include/qad")
list(APPEND _QAD_LIBDIR "${CMAKE_PREFIX_PATH}/lib")
#if (DEFINED ANDROID_PLATFORM)
# list(APPEND _PIP_INCDIR ${CMAKE_PREFIX_PATH}/include/qad)
# list(APPEND _PIP_LIBDIR ${CMAKE_PREFIX_PATH}/lib)
#endif()
include_directories(${CMAKE_PREFIX_PATH}/include)
link_directories(${CMAKE_PREFIX_PATH}/lib)
else()
if(NOT WIN32)
list(APPEND _QAD_INCDIR "/usr/include/qad" "/usr/local/include/qad")
list(APPEND _QAD_LIBDIR "/usr/lib" "/usr/local/lib")
endif()
if(APPLE)
include_directories(/usr/local/include)
link_directories(/usr/local/lib)
endif()
endif()
find_file(QAD_H_INCLUDE "qad_types.h" HINTS ${PIP_DIR}/include/qad ${_QAD_INCDIR} $ENV{SMSDK_DIR}/include/qad)
#if (DEFINED ANDROID_PLATFORM)
# set(QAD_INCLUDES ${ANDROID_SYSTEM_LIBRARY_PATH}/usr/include/qad)
#else()
get_filename_component(QAD_INCLUDES ${QAD_H_INCLUDE} PATH)
#endif()
set(_SEARCH_DIR ${_QAD_LIBDIR} $ENV{SMSDK_DIR}/lib)
set(_QAD_LIBS utils widgets application blockview graphic sql_table touch_widgets doc)
set(_ITN_utils "Utils" )
set(_ITN_widgets "Widgets" )
set(_ITN_application "Application" )
set(_ITN_blockview "Blockview" )
set(_ITN_graphic "Graphic" )
set(_ITN_sql_table "SQLTable" )
set(_ITN_touch_widgets "TouchWidgets")
set(_ITN_doc "Doc" )
set(_ITLL_widgets "QAD::Utils")
set(_ITLL_application "QAD::Widgets")
set(_ITLL_blockview "QAD::Widgets")
set(_ITLL_graphic "QAD::Widgets")
set(_ITLL_sql_table "QAD::Widgets")
set(_ITLL_touch_widgets "")
set(_ITLL_doc "")
if(LIBPROJECT)
set(QAD_INCLUDES ${QAD_DIR})
endif()
foreach(_Q ${_QAD_LIBS})
string(TOUPPER ${_Q} _QU)
if(LIBPROJECT)
set(QAD_${_QU}_LIBRARY qad_${_Q})
list(APPEND QAD_INCLUDES ${QAD_DIR}/${_Q})
else()
foreach(_v ${_QT_VERSIONS_})
find_library(QAD${_v}_${_QU}_LIBRARY qad_${_Q}${_v} HINTS ${_SEARCH_DIR})
set(MULTILIB_qad_${_Q}_SUFFIX_Qt${_v} ${_v})
if(hasParent)
set(MULTILIB_qad_${_Q}_SUFFIX_Qt${_v} ${_v} PARENT_SCOPE)
endif()
#message(STATUS "MULTILIB_qad_${_Q}_SUFFIX_Qt${_v} = ${_v}")
endforeach()
endif()
#message(STATUS "Library qad_${_Q}5 (${_QU}) -> ${QAD5_${_QU}_LIBRARY} found in ${_SEARCH_DIR}")
list(APPEND QT_MULTILIB_LIST qad_${_Q})
endforeach()
set(_PIQT_LIBS piqt piqt_utils)
foreach(_Q ${_PIQT_LIBS})
foreach(_v ${_QT_VERSIONS_})
set(MULTILIB_${_Q}_SUFFIX_Qt${_v} ${_v})
if(hasParent)
set(MULTILIB_${_Q}_SUFFIX_Qt${_v} ${_v} PARENT_SCOPE)
endif()
#message(STATUS "MULTILIB_${_Q}_SUFFIX_Qt${_v} = ${_v}")
endforeach()
#message(STATUS "Library ${_Q}5 (${_QU}) -> ${QAD5_${_QU}_LIBRARY} found in ${_SEARCH_DIR}")
list(APPEND QT_MULTILIB_LIST ${_Q})
endforeach()
foreach(_Q ${_QAD_LIBS})
string(TOUPPER ${_Q} _QU)
set(_target QAD::${_ITN_${_Q}})
string(REPLACE ":" "_" _target_str "${_target}")
foreach(_v ${_QT_VERSIONS_})
if(NOT TARGET ${_target}${_v})
set(_link_list)
foreach(_l ${_ITLL_${_Q}})
list(APPEND _link_list ${_l}${_v})
endforeach()
add_library(${_target}${_v} UNKNOWN IMPORTED)
set_target_properties(${_target}${_v} PROPERTIES
IMPORTED_LOCATION "${QAD${_v}_${_QU}_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${QAD_INCLUDES}"
INTERFACE_LINK_LIBRARIES "${_link_list}")
set(MULTILIB_${_target_str}_SUFFIX_Qt${_v} ${_v})
if(hasParent)
set(MULTILIB_${_target_str}_SUFFIX_Qt${_v} ${_v} PARENT_SCOPE)
endif()
#message(STATUS "add imported ${_target}${_v}")
#message(STATUS "add MULTILIB MULTILIB_${_target_str}_SUFFIX_Qt${_v} ${_v}")
endif()
endforeach()
list(APPEND QT_MULTILIB_LIST ${_target})
endforeach()
list(APPEND QT_MULTILIB_LIST qglview qglengine_core qglengine_widgets)
foreach(_v ${_QT_VERSIONS_})
find_library(QGLVIEW${_v}_LIBRARY qglview${_v} ${_SEARCH_DIR})
set(MULTILIB_qglview_SUFFIX_Qt${_v} ${_v})
if(hasParent)
set(MULTILIB_qglview_SUFFIX_Qt${_v} ${_v} PARENT_SCOPE)
endif()
endforeach()
if(hasParent)
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
endif()
if(NOT LIBPROJECT)
if(NOT QAD_VERSION)
include(CheckSymbolExists)
check_symbol_exists(QAD_VERSION_NAME "${QAD_INCLUDES}/qad_version.h" HAVE_QAD_VERSION)
if (HAVE_QAD_VERSION)
file(STRINGS "${QAD_INCLUDES}/qad_version.h" _VERSION REGEX "^[ \t]*#define[ \t]+QAD_VERSION_NAME+[ \t]+.*$")
string(REGEX MATCH "\".*\"" _VERSION ${_VERSION})
string(LENGTH ${_VERSION} SL)
math(EXPR SL ${SL}-2)
string(SUBSTRING ${_VERSION} 1 ${SL} _VERSION)
set(QAD_VERSION ${_VERSION} CACHE STRING "VERSION")
else()
message(FATAL_ERROR "Can`t find QAD version file!")
endif()
endif()
if(QAD_FIND_VERSION VERSION_GREATER QAD_VERSION)
message(FATAL_ERROR "QAD version ${QAD_VERSION} is available, but ${QAD_FIND_VERSION} requested!")
endif()
if (NOT _QAD_MSG)
set(_QAD_MSG 1 CACHE BOOL "msg_qad" FORCE)
message(STATUS "Found QAD (version \"${QAD_VERSION}\")")
endif()
endif()

View File

@@ -1,90 +0,0 @@
macro(_qt_install _TARGET IS_APP _DIR _HDR_VAR _QM_FILES)
sdk_install("${_DIR}" ${IS_APP} "${_TARGET}" "${${_HDR_VAR}}" "${_QM_FILES}")
endmacro()
macro(_qt_plugin NAME _MODULES _LIBS)
if (NOT STATIC_LIB)
if(DESIGNER_PLUGINS)
set(PROJ_NAME ${NAME}_plugin)
include_directories("..")
add_definitions(-DQT_PLUGIN)
add_definitions(-DQT_NO_DEBUG)
add_definitions(-DQT_SHARED)
add_definitions(-DQDESIGNER_EXPORT_WIDGETS)
find_qt(${QtVersions} Core Designer ${_MODULES})
qt_sources(SRC)
qt_wrap(${SRC} CPPS out_CPP QMS out_QM)
qt_add_library(${PROJ_NAME} SHARED out_CPP)
qt_target_link_libraries(${PROJ_NAME} ${_LIBS} ${_${NAME}_PLUGIN_LIBS})
if (WIN32)
qt_install(TARGETS ${PROJ_NAME} RUNTIME DESTINATION QtPlugins/designer)
else()
qt_install(TARGETS ${PROJ_NAME} DESTINATION QtPlugins/designer)
endif()
list(APPEND _qt_plugs ${NAME})
copy_to_parent("")
endif()
endif()
endmacro()
macro(_qt_project NAME IS_APP DOMAIN _MODULES _LIBS)
set(PROJ_NAME ${NAME})
find_qt(${QtVersions} Core ${_MODULES})
qt_sources(SRC)
import_version(${PROJ_NAME} ${DOMAIN})
import_deploy_properties(${PROJ_NAME} ${DOMAIN})
if (${IS_APP})
list(APPEND _qt_apps ${PROJ_NAME})
set_deploy_property(${PROJ_NAME}
LABEL ${PROJ_NAME}
FULLNAME "${_${DOMAIN}_DOMAIN}.${PROJ_NAME}"
INFO "${APP_INFO}"
ICON "${APP_ICON}")
else()
list(APPEND _qt_libs ${PROJ_NAME})
set_deploy_property(${PROJ_NAME} SHARED
LABEL ${PROJ_NAME}
FULLNAME "${_${DOMAIN}_DOMAIN}.${PROJ_NAME}"
INFO "${DOMAIN} ${NAME} library")
endif()
make_rc(${PROJ_NAME} out_RC)
qt_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM ${out_RC})
if (${IS_APP})
qt_add_executable(${PROJ_NAME} WIN32 out_CPP ${${DOMAIN}_EXPORT_HEADER} ${ARGN})
else()
qt_add_library(${PROJ_NAME} ${${DOMAIN}_LIB_TYPE} out_CPP ${${DOMAIN}_EXPORT_HEADER} ${ARGN})
if(NOT STATIC_LIB)
qt_target_compile_definitions(${PROJ_NAME} PRIVATE ${DOMAIN}_SHARED_DEFINE)
endif()
qt_generate_export_header(${PROJ_NAME})
list(APPEND out_HDR "${CMAKE_CURRENT_BINARY_DIR}/${PROJ_NAME}_export.h")
endif()
qt_target_link_libraries(${PROJ_NAME} ${_LIBS})
list(APPEND QT_MULTILIB_LIST ${PROJ_NAME})
#message(STATUS "Building ${PROJ_NAME}")
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/plugin")
set(_${NAME}_PLUGIN_LIBS "${_LIBS}")
add_subdirectory(plugin)
endif()
copy_to_parent("")
endmacro()
macro(qad_library NAME _MODULES _LIBS)
_qt_project(qad_${NAME} FALSE "QAD" "${_MODULES}" "${_LIBS}")
_qt_install(qad_${NAME} FALSE "qad" "out_HDR" "out_QM")
endmacro()
macro(qad_application NAME _MODULES _LIBS)
_qt_project(${NAME} TRUE "QAD" "${_MODULES}" "${_LIBS}")
_qt_install(${NAME} TRUE "qad" "" "out_QM")
endmacro()
macro(qad_plugin NAME _MODULES _LIBS)
_qt_plugin(qad_${NAME} "${_MODULES}" "qad_${NAME};${_LIBS}")
endmacro()

View File

@@ -1,811 +0,0 @@
#[[
find_qt([<Module1> <Module2> ...] [Qt4] [Qt5])
Find Qt4 or/and Qt5 packages
If Qt4/5 found, set
* Qt<4/5>_ROOT var to Qt root dir
* Qt<4/5>_BIN var to Qt binary dir
* Qt<4/5>_PLUGINS_DIR var to Qt plugins dir
* Qt<4/5>_LANG_DIR var to Qt translations dir
qt_sources(<src_out_var> [NO_DEFAULT] [DIR <dir>] [<regexp> ...])
Collect all sources, optionally in directory <dir> and
Additional filters <regexp>. By default filter files with regexps
"*.h", "*.hpp", "*.c", "*.cpp", "*.ui", "*.qrc", "*.rc", "*.ts" and "lang/*.ts".
Default filters disabled with option NO_DEFAULT
qt_wrap(<file0> <file1> ... [HDRS <hrd_var>] [CPPS <cpp_var>] [QMS <qm_var>])
Prepare sources for compile
Store headers to <hrd_var>, all wrapped Qt4 files to <cpp_var>_Qt4 and Qt5 files to <cpp_var>_Qt5
version are automatic detected after find_qt() call
qt_add_executable(<name> [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL] source1 [source2 ...])
Add executables for founded Qt versions, target names is <name><TARGET_SUFFIX_Qt?>
All needed Qt includes automatic added to corresponding targets
<source> cant be CPPS variable passed to qt_wrap() or some list or filename
qt_add_library(<name> [STATIC | SHARED | MODULE] [EXCLUDE_FROM_ALL] source1 [source2 ...])
Add library for founded Qt versions, target names is <name><TARGET_SUFFIX_Qt?>
All needed Qt includes automatic added to corresponding targets
<source> cant be CPPS variable passed to qt_wrap() or some list or filename
qt_target_link_libraries(<name> ... <item> ...)
Link targets for founded Qt versions, target names is <name><TARGET_SUFFIX_Qt?>
All needed Qt libraries automatic added to corresponding targets
if QT_MULTILIB_LIST contains some linking library, to it name automatic
add <MULTILIB_SUFFIX_Qt?> or individual <MULTILIB_>libname<_SUFFIX_Qt?>
qt_target_compile_definitions(<name> ...)
Syntax similar to original "target_compile_definitions()"
Specify compile definitions to use when compiling a given <name>
qt_target_include_directories(<name> ...)
Syntax similar to original "target_include_directories()"
Add include directories to a target
qt_install(...)
Syntax similar to original "install()"
Install targets for founded Qt versions
if DESTINATION set to "QtBin" files will be installed
to corresponding Qt binary directory
if DESTINATION set to "QtLang" files will be installed
to corresponding Qt translation directory
if DESTINATION starts with "QtPlugins" files will be installed
to corresponding Qt plugins directory
Add LANG type for first argument - in this case you should
specify variable name, not variable value!
e.g. "qt_install(LANG my_QM DESTINATION QtLang)"
qt_install_lang(<name> DESTINATION <dir> [PATHS <path0> [<path1>] [...] ])
Search Qt translations for all <name> dependencies
in Qt<?>_LANG_DIR for <name>_LANG languages
and install them to <dir>. PATH are additional search paths.
You should use "set_lang()" macro before this action
qt_get_target(<name> <var> [Qt4 | Qt5])
Write real <name> Qt target name to <var>
If Qt4 or Qt5 specified, search for this version,
otherwise returns greatest version
qt_get_targets(<name> <var>)
Write all real <name> Qt target names to <var>
qt_generate_export_header(<name> ...)
Call generate_export_header on Qt multitarget
]]
cmake_policy(SET CMP0011 NEW) # don`t affect includer policies
cmake_policy(SET CMP0020 NEW) # Automatically link Qt executables to qtmain target on Windows
if (POLICY CMP0057)
cmake_policy(SET CMP0057 NEW) # Support if() IN_LIST
endif()
if (POLICY CMP0074)
cmake_policy(SET CMP0074 OLD) # ignore <PackageName>_ROOT variables
endif()
set(__qt_bug_modules "UiTools")
set(_QT_VERSIONS_ 4 5)
foreach(_v ${_QT_VERSIONS_})
if (NOT DEFINED TARGET_SUFFIX_Qt${_v})
set(TARGET_SUFFIX_Qt${_v} "${_v}")
set(MULTILIB_SUFFIX_Qt${_v} "${_v}")
endif()
set(MOC_INC_Qt${_v})
endforeach()
if (NOT DEFINED QT_MULTILIB_LIST)
set(QT_MULTILIB_LIST)
endif()
#set(TARGET_SUFFIX_Qt4 "")
macro(find_qt)
set(_QCOMP)
foreach(_v ${_QT_VERSIONS_})
set(_NEED${_v} 0)
set(LOCAL_FOUND${_v} 0)
set(MOC_INC_Qt${_v})
set(Qt${_v}_INCLUDES)
set(Qt${_v}_LIBRARIES)
set(Qt${_v}_ROOT)
set(Qt${_v}_BIN)
set(Qt${_v}_PLUGINS_DIR)
set(Qt${_v}_LANG_DIR)
endforeach()
set(_NEED_SOME 0)
set(_QUIET)
foreach(_i ${ARGN})
set(_FOUND_NEED 0)
foreach(_v ${_QT_VERSIONS_})
if ("x${_i}" STREQUAL "xQt${_v}")
set(_NEED${_v} 1)
set(_NEED_SOME 1)
set(_FOUND_NEED 1)
endif()
if ("x${_i}" STREQUAL "xQUIET")
set(_QUIET QUIET)
endif()
endforeach()
if (NOT _FOUND_NEED)
list(APPEND _QCOMP "${_i}")
endif()
endforeach()
if (NOT _NEED_SOME)
foreach(_v ${_QT_VERSIONS_})
set(_NEED${_v} 1)
endforeach()
endif()
list(REMOVE_DUPLICATES _QCOMP)
if (_NEED4)
find_package(Qt4 ${_QUIET})
if (Qt4_FOUND)
set(LOCAL_FOUND4 1)
get_filename_component(Qt4_BIN ${QT_QMAKE_EXECUTABLE} PATH)
set(Qt4_INCLUDES ${QT_INCLUDES})
foreach(m ${_QCOMP})
string(TOUPPER "${m}" _um)
#message("${QT_QT${_um}_FOUND}")
if (${QT_QT${_um}_FOUND})
list(APPEND Qt4_LIBRARIES ${QT_QT${_um}_LIBRARY})
endif()
endforeach()
set(Qt4_PLUGINS_DIR ${QT_PLUGINS_DIR})
set(Qt4_LANG_DIR ${Qt4_BIN}/../translations)
set(Qt4_ROOT "${Qt4_BIN}/../")
endif()
endif()
if (_NEED5)
#set(_MSG 1)
#if (Qt5_FOUND)
# set(_MSG 0)
#endif()
find_package(Qt5 COMPONENTS Core LinguistTools UiPlugin Widgets ${_QCOMP} ${_QUIET})
if (DEFINED ANDROID_PLATFORM)
set(CMAKE_SHARED_MODULE_SUFFIX_CXX ".so")
set(CMAKE_SHARED_LIBRARY_SUFFIX_CXX ".so")
set(CMAKE_SHARED_MODULE_SUFFIX_C ".so")
set(CMAKE_SHARED_LIBRARY_SUFFIX_C ".so")
endif()
if (Qt5_FOUND)
set(LOCAL_FOUND5 1)
set(_Qt5Modules)
foreach(m ${_QCOMP})
if (${Qt5${m}_FOUND})
set(__lib ${Qt5${m}_LIBRARIES})
if (DEFINED ANDROID_PLATFORM)
if (m IN_LIST __qt_bug_modules)
get_target_property(__lib Qt5::${m} LOCATION)
endif()
endif()
list(APPEND _Qt5Modules ${m})
list(APPEND Qt5_INCLUDES ${Qt5${m}_INCLUDE_DIRS})
list(APPEND Qt5_LIBRARIES ${__lib})
endif()
endforeach()
#get_property(_up_dir TARGET Qt5::UiPlugin PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
#message("${_up_dir}")
#if (NOT "x${_up_dir}" STREQUAL "x")
# list(APPEND Qt5_INCLUDES ${_up_dir})
#endif()
get_target_property(_Qt5_qmake Qt5::qmake LOCATION)
get_filename_component(Qt5_BIN ${_Qt5_qmake} PATH)
foreach(_p ${Qt5Gui_PLUGINS})
get_target_property(_l ${_p} LOCATION)
get_filename_component(_l ${_l} DIRECTORY)
string(FIND "${_l}" "/" _ind REVERSE)
string(SUBSTRING "${_l}" 0 ${_ind} _l)
set(Qt5_PLUGINS_DIR ${_l})
#message("Qt5: plugins dir: ${Qt5_PLUGINS_DIR}")
break()
endforeach()
string(FIND "${Qt5_BIN}" "/" _ind REVERSE)
string(SUBSTRING "${Qt5_BIN}" 0 ${_ind} Qt5_ROOT)
if ("x${Qt5_PLUGINS_DIR}" STREQUAL "x")
set(Qt5_PLUGINS_DIR "${Qt5_ROOT}/plugins")
endif()
if (APPLE)
list(APPEND MOC_INC_Qt5 "-F${Qt5_ROOT}/lib")
endif()
set(Qt5_LANG_DIR ${Qt5_BIN}/../translations)
if (NOT _QT5_MSG)
message(STATUS "Found Qt5: ${_Qt5_qmake} (version \"${Qt5_VERSION}\")")
set(_QT5_MSG 1 CACHE BOOL "msg_qt5" FORCE)
#message(STATUS "Found Qt5 modules: ${_Qt5Modules}")
endif()
endif()
endif()
foreach(_v ${_QT_VERSIONS_})
if (LOCAL_FOUND${_v})
foreach(_p ${Qt${_v}_INCLUDES})
list(APPEND MOC_INC_Qt${_v} "-I${_p}")
#message("${_p}")
endforeach()
endif()
#message("${MOC_INC_Qt${_v}}")
endforeach()
endmacro()
macro(qt_sources OUT)
set(${OUT})
set(_DIR "")
set(_IS_DIR 0)
set(_NO_DEFAULT 0)
set(_DEFAULT)
set(_REGEXP)
set(_REGEXP_WD)
foreach(_i ${ARGN})
if (_IS_DIR)
set(_DIR "${_i}")
set(_IS_DIR 0)
elseif ("x${_i}" STREQUAL "xDIR")
set(_IS_DIR 1)
elseif ("x${_i}" STREQUAL "xNO_DEFAULT")
set(_NO_DEFAULT 1)
else()
list(APPEND _REGEXP ${_i})
endif()
endforeach()
if (NOT "x${_DIR}" STREQUAL "x")
#file(TO_CMAKE_PATH "${_DIR}//" _DIR)
string(REPLACE "\\" "/" _DIR "${_DIR}/")
string(REPLACE "//" "/" _DIR "${_DIR}")
endif()
foreach(_i ${_REGEXP})
list(APPEND _REGEXP_WD "${_DIR}${_i}")
endforeach()
if (NOT _NO_DEFAULT)
set(_DEFAULT "${_DIR}*.h" "${_DIR}*.hpp" "${_DIR}*.c" "${_DIR}*.cpp" "${_DIR}*.ui" "${_DIR}*.qrc" "${_DIR}*.rc" "${_DIR}*.ts" "${_DIR}lang/*.ts")
endif()
#message("${_DEFAULT}, ${_REGEXP_WD}")
file(GLOB ${OUT} ${_DEFAULT} ${_REGEXP_WD})
endmacro()
macro(qt_wrap)
set(HDR_VAR)
set(CPP_VAR)
set(QM_VAR)
set(_HDR_ARG 0)
set(_CPP_ARG 0)
set(_QM_ARG 0)
set(WAS_HDR_ARG 0)
set(WAS_CPP_ARG 0)
set(WAS_QM_ARG 0)
set(FILE_LIST)
foreach(_i ${ARGN})
if (_HDR_ARG)
set(HDR_VAR ${_i})
set(WAS_HDR_ARG 1)
set(_HDR_ARG 0)
elseif (_CPP_ARG)
set(CPP_VAR ${_i})
set(WAS_CPP_ARG 1)
set(_CPP_ARG 0)
elseif (_QM_ARG)
set(QM_VAR ${_i})
set(WAS_QM_ARG 1)
set(_QM_ARG 0)
elseif ("x${_i}" STREQUAL "xHDRS")
set(_HDR_ARG 1)
elseif ("x${_i}" STREQUAL "xCPPS")
set(_CPP_ARG 1)
elseif ("x${_i}" STREQUAL "xQMS")
set(_QM_ARG 1)
else()
list(APPEND FILE_LIST "${_i}")
endif()
endforeach()
foreach(_v ${_QT_VERSIONS_})
set(CPP${_v}_VAR)
set(QM${_v}_VAR)
if (LOCAL_FOUND${_v})
if (WAS_CPP_ARG)
set(CPP${_v}_VAR ${CPP_VAR}_Qt${_v})
endif()
if (WAS_QM_ARG)
set(QM${_v}_VAR ${QM_VAR}_Qt${_v})
endif()
endif()
endforeach()
#message("found 4: ${LOCAL_FOUND4}, 5: ${LOCAL_FOUND5}")
#message("has HRDS: ${WAS_HDR_ARG}: ${HDR_VAR}")
#message("has CPPS4: ${WAS_CPP_ARG}: ${CPP4_VAR}")
#message("has CPPS5: ${WAS_CPP_ARG}: ${CPP5_VAR}")
#message("files: ${FILE_LIST}")
set(H_LIST)
set(CPP_LIST)
set(UI_LIST)
set(RES_LIST)
set(RC_LIST)
set(TS_LIST)
foreach(_i ${FILE_LIST})
get_filename_component(_EXT "${_i}" EXT)
#message("${_EXT}")
if (NOT ("x${_EXT}" STREQUAL "x"))
if (("x${_EXT}" STREQUAL "x.h") OR ("x${_EXT}" STREQUAL "x.hpp"))
list(APPEND H_LIST "${_i}")
#message("header")
endif()
if (("x${_EXT}" STREQUAL "x.c") OR ("x${_EXT}" STREQUAL "x.cpp") OR ("x${_EXT}" STREQUAL "x.cxx"))
list(APPEND CPP_LIST "${_i}")
#message("source")
endif()
if ("x${_EXT}" STREQUAL "x.ui")
list(APPEND UI_LIST "${_i}")
endif()
if ("x${_EXT}" STREQUAL "x.qrc")
list(APPEND RES_LIST "${_i}")
endif()
if ("x${_EXT}" STREQUAL "x.rc")
list(APPEND RC_LIST "${_i}")
endif()
if ("x${_EXT}" STREQUAL "x.ts")
list(APPEND TS_LIST "${_i}")
endif()
endif()
endforeach()
if (WAS_HDR_ARG)
set(${HDR_VAR})
list(APPEND ${HDR_VAR} ${H_LIST})
endif()
set(SRC_CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
foreach(_v ${_QT_VERSIONS_})
if (LOCAL_FOUND${_v} AND WAS_CPP_ARG)
set(CMAKE_CURRENT_BINARY_DIR ${SRC_CMAKE_CURRENT_BINARY_DIR}/qt${_v})
set(${CPP${_v}_VAR})
if (WAS_QM_ARG)
set(${QM${_v}_VAR})
endif()
set(MOCS${_v})
set(CUIS${_v})
set(CRES${_v})
if (${_v} EQUAL 4)
qt4_wrap_cpp(MOCS${_v} ${H_LIST} OPTIONS -nw ${MOC_INC_Qt4})
qt4_wrap_ui(CUIS${_v} ${UI_LIST})
qt4_add_resources(CRES${_v} ${RES_LIST})
if (WAS_QM_ARG)
set(${QM${_v}_VAR} "")
qt4_add_translation(${QM${_v}_VAR} ${TS_LIST})
endif()
elseif (${_v} EQUAL 5)
qt5_wrap_cpp(MOCS${_v} ${H_LIST} OPTIONS -nw ${MOC_INC_Qt5})
qt5_wrap_ui(CUIS${_v} ${UI_LIST})
qt5_add_resources(CRES${_v} ${RES_LIST})
if (WAS_QM_ARG)
set(${QM${_v}_VAR} "")
qt5_add_translation(${QM${_v}_VAR} ${TS_LIST})
endif()
else()
# Qt6 ...
endif()
#message("${${QM${_v}_VAR}}")
list(APPEND ${CPP${_v}_VAR} ${CPP_LIST})
list(APPEND ${CPP${_v}_VAR} ${RC_LIST})
list(APPEND ${CPP${_v}_VAR} ${MOCS${_v}})
list(APPEND ${CPP${_v}_VAR} ${CUIS${_v}})
list(APPEND ${CPP${_v}_VAR} ${CRES${_v}})
if (WAS_QM_ARG)
list(APPEND ${CPP${_v}_VAR} ${${QM${_v}_VAR}})
endif()
#message("${${QM${_v}_VAR}}")
endif()
endforeach()
set(CMAKE_CURRENT_BINARY_DIR ${SRC_CMAKE_CURRENT_BINARY_DIR})
endmacro()
macro(_qt_split_add_args _P _A)
set(${_P})
set(${_A})
foreach(_i ${ARGN})
if (NOT ("x${${_i}_Qt${_v}}" STREQUAL "x"))
list(APPEND ${_A} ${${_i}_Qt${_v}})
elseif (("x${_i}" STREQUAL "xWIN32") OR
("x${_i}" STREQUAL "xMACOSX_BUNDLE") OR
("x${_i}" STREQUAL "xSTATIC") OR
("x${_i}" STREQUAL "xSHARED") OR
("x${_i}" STREQUAL "xMODULE") OR
("x${_i}" STREQUAL "xEXCLUDE_FROM_ALL"))
list(APPEND ${_P} ${_i})
elseif ("x${${_i}}" STREQUAL "x")
list(APPEND ${_A} ${_i})
else()
list(APPEND ${_A} ${${_i}})
endif()
endforeach()
endmacro()
macro(__qt_set_defines _NAME _T)
target_compile_definitions(${_T} PRIVATE "__TARGET_NAME__=\"${_NAME}\"")
target_compile_definitions(${_T} PRIVATE "__TARGET_LABEL__=\"${${_NAME}_LABEL}\"")
target_compile_definitions(${_T} PRIVATE "__TARGET_COMPANY__=\"${${_NAME}_COMPANY}\"")
target_compile_definitions(${_T} PRIVATE "__TARGET_VERSION__=\"${${_NAME}_VERSION}\"")
endmacro()
macro(qt_add_executable _NAME)
foreach(_v ${_QT_VERSIONS_})
if (LOCAL_FOUND${_v})
_qt_split_add_args(_PREF _ARGS ${ARGN})
if(APPLE)
set(_PREV_CIND "${CMAKE_INSTALL_NAME_DIR}")
set(CMAKE_INSTALL_NAME_DIR "@rpath")
else()
if(NOT WIN32)
set(CMAKE_INSTALL_RPATH "\$ORIGIN;\$ORIGIN/lib")
endif()
endif()
set(_TARGET ${_NAME}${TARGET_SUFFIX_Qt${_v}})
add_executable(${_TARGET} ${_PREF} ${_ARGS})
set(_${_NAME}_is_qt 1)
target_include_directories(${_TARGET} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/qt${_v} ${Qt${_v}_INCLUDES})
__qt_set_defines(${_NAME} ${_TARGET})
if(APPLE)
set(CMAKE_INSTALL_NAME_DIR "${_PREV_CIND}")
endif()
# # Apple crosscompiling rpath patch
# if (APPLE AND CMAKE_CROSSCOMPILING AND CMAKE_MACOSX_RPATH)
# foreach(_RP ${CMAKE_INSTALL_RPATH})
# add_custom_command(TARGET ${_TARGET} POST_BUILD
# COMMAND "${CMAKE_INSTALL_NAME_TOOL}"
# "-add_rpath" "${_RP}"
# "$<TARGET_FILE_DIR:${_TARGET}>/$<TARGET_FILE_NAME:${_TARGET}>"
# COMMENT "Add to ${_TARGET} rpath \"${_RP}\"")
# endforeach()
# endif()
#list(APPEND _ALL_TARGETS "${_TARGET}")
#set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
endif()
endforeach()
endmacro()
macro(qt_add_library _NAME)
foreach(_v ${_QT_VERSIONS_})
if (LOCAL_FOUND${_v})
_qt_split_add_args(_PREF _ARGS ${ARGN})
if(APPLE)
set(_PREV_CIND "${CMAKE_INSTALL_NAME_DIR}")
set(CMAKE_INSTALL_NAME_DIR "@rpath")
else()
if(NOT WIN32)
set(CMAKE_INSTALL_RPATH "\$ORIGIN;\$ORIGIN/lib")
endif()
endif()
set(_TARGET ${_NAME}${TARGET_SUFFIX_Qt${_v}})
add_library(${_TARGET} ${_PREF} ${_ARGS})
set(_${_NAME}_is_qt 1)
target_include_directories(${_TARGET} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/qt${_v} ${Qt${_v}_INCLUDES})
__qt_set_defines(${_NAME} ${_TARGET})
#message("add lib: \"${_TARGET}\"")
if(APPLE)
set(CMAKE_INSTALL_NAME_DIR "${_PREV_CIND}")
endif()
# # Apple crosscompiling rpath patch
# if (APPLE AND CMAKE_CROSSCOMPILING AND CMAKE_MACOSX_RPATH)
# foreach(_RP ${CMAKE_INSTALL_RPATH})
# add_custom_command(TARGET ${_TARGET} POST_BUILD
# COMMAND "${CMAKE_INSTALL_NAME_TOOL}"
# "-add_rpath" "${_RP}"
# "$<TARGET_FILE_DIR:${_TARGET}>/$<TARGET_FILE_NAME:${_TARGET}>"
# COMMENT "Add to ${_TARGET} rpath \"${_RP}\"")
# endforeach()
# endif()
list(APPEND _ALL_TARGETS "${_TARGET}")
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
endif()
endforeach()
endmacro()
macro(_qt_multitarget_suffix_ _OUT _IN _v)
string(REPLACE ":" "_" _in_str "${_IN}")
if (NOT "x${MULTILIB_${_in_str}_SUFFIX_Qt${_v}}" STREQUAL "x")
set(${_OUT} "${MULTILIB_${_in_str}_SUFFIX_Qt${_v}}")
else()
set(${_OUT} "${MULTILIB_SUFFIX_Qt${_v}}")
endif()
endmacro()
macro(qt_target_link_libraries _NAME)
foreach(_v ${_QT_VERSIONS_})
if (LOCAL_FOUND${_v})
set(_TARGET ${_NAME}${TARGET_SUFFIX_Qt${_v}})
set(_ARGS)
foreach(_i ${ARGN})
set(_ind -1)
list(FIND QT_MULTILIB_LIST "${_i}" _ind)
if (_ind GREATER -1)
_qt_multitarget_suffix_(_TS ${_i} ${_v})
#message(STATUS "${_i} in MULTILIB_LIST, suffix = ${_TS}")
list(APPEND _ARGS ${_i}${_TS})
else()
list(APPEND _ARGS ${_i})
endif()
endforeach()
target_link_libraries(${_TARGET} ${Qt${_v}_LIBRARIES} ${_ARGS})
#message("link ${_TARGET}: ${Qt${_v}_LIBRARIES} ${_ARGS}")
endif()
endforeach()
endmacro()
macro(qt_target_compile_definitions _NAME)
foreach(_v ${_QT_VERSIONS_})
if (LOCAL_FOUND${_v})
set(_TARGET ${_NAME}${TARGET_SUFFIX_Qt${_v}})
target_compile_definitions(${_TARGET} ${ARGN})
endif()
endforeach()
endmacro()
macro(qt_target_include_directories _NAME)
foreach(_v ${_QT_VERSIONS_})
if (LOCAL_FOUND${_v})
set(_TARGET ${_NAME}${TARGET_SUFFIX_Qt${_v}})
target_include_directories(${_TARGET} ${ARGN})
endif()
endforeach()
endmacro()
macro(qt_install)
set(_prev_inst)
set(__add_args)
#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)
set(_INVALID 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)
set(__target ${_i})
if (_${_i}_is_qt)
set(__target ${_i}${TARGET_SUFFIX_Qt${_v}})
endif()
if (DEFINED ANDROID_PLATFORM)
get_target_property(_TT ${__target} TYPE)
if ("x${_TT}" STREQUAL "xEXECUTABLE")
list(APPEND __add_args EXCLUDE_FROM_ALL)
endif()
endif()
list(APPEND _INST_LIST ${__target})
elseif (_IS_FILES)
set(_IS_FILES 0)
if (_IS_LANG)
if (("x${${_i}_Qt${_v}}" STREQUAL "x") OR ("x${_i}" STREQUAL "xDESTINATION"))
set(_INVALID 1)
else()
list(APPEND _INST_LIST ${${_i}_Qt${_v}})
endif()
else()
list(APPEND _INST_LIST ${_i})
endif()
else()
if (_IS_DEST)
set(_IS_DEST 0)
if ("x${_i}" STREQUAL "xQtBin")
list(APPEND _INST_LIST "${Qt${_v}_BIN}")
elseif ("x${_i}" STREQUAL "xQtLang")
list(APPEND _INST_LIST "${Qt${_v}_LANG_DIR}")
else()
set(_ind -1)
string(FIND "${_i}" "QtPlugins" _ind)
if (_ind GREATER -1)
string(REPLACE "QtPlugins" "${Qt${_v}_PLUGINS_DIR}" _o "${_i}")
list(APPEND _INST_LIST "${_o}")
else()
string(REPLACE "\\" "/" _o "${_i}")
list(APPEND _INST_LIST ${_o})
endif()
endif()
else()
set(_ii ${_i})
if ("x${_i}" STREQUAL "xTARGETS")
set(_IS_TARGET 1)
elseif ("x${_i}" STREQUAL "xFILES")
set(_IS_FILES 1)
elseif ("x${_i}" STREQUAL "xDESTINATION")
set(_IS_DEST 1)
elseif ("x${_i}" STREQUAL "xLANG")
set(_IS_FILES 1)
set(_IS_LANG 1)
set(_ii "FILES")
endif()
list(APPEND _INST_LIST ${_ii})
endif()
endif()
endforeach()
if (NOT _INVALID)
if (NOT ("x${_prev_inst}" STREQUAL "x${_INST_LIST}"))
#message("install: ${_INST_LIST}")
install(${_INST_LIST} ${__add_args})
set(_prev_inst "${_INST_LIST}")
endif()
endif()
endif()
endforeach()
endmacro()
macro(qt_install_lang _NAME)
set(_prev_inst)
#message("command: ${ARGN}")
set(_PATHS)
set(_DEST)
if(CMAKE_CROSSCOMPILING)
list(APPEND _PATHS "${CMAKE_PREFIX_PATH}/lang")
endif()
set(_cur_arg)
set(__args "DESTINATION;PATHS")
foreach(_i ${ARGN})
if (_i IN_LIST __args)
set(_cur_arg "${_i}")
elseif("${_cur_arg}" STREQUAL "DESTINATION")
set(_DEST "${_i}")
elseif("${_cur_arg}" STREQUAL "PATHS")
list(APPEND _PATHS "${_i}")
endif()
endforeach()
foreach(_v ${_QT_VERSIONS_})
if (LOCAL_FOUND${_v})
set(_target)
if (_${_NAME}_is_qt)
set(_target ${_NAME}${TARGET_SUFFIX_Qt${_v}})
endif()
get_target_property(_LL ${_target} LINK_LIBRARIES)
foreach (_L ${_LL})
get_filename_component(_libname "${_L}" NAME_WE)
#message("depend on ${_libname}")
if ("${_libname}" MATCHES "Qt${_v}::.*")
string(SUBSTRING "${_libname}" 5 -1 _libname)
string(TOLOWER "${_libname}" _libname)
#message("qt lib \"${_libname}\"")
list(APPEND _qt_libs qt${_libname})
else()
if ("${_libname}" MATCHES "lib.*")
string(LENGTH ${_libname} _sl)
math(EXPR _sl ${_sl}-3)
string(SUBSTRING ${_libname} 3 ${_sl} _libname)
endif()
if ("${_libname}" MATCHES "qad_.*${_v}")
string(LENGTH ${_libname} _sl)
math(EXPR _sl ${_sl}-1)
string(SUBSTRING ${_libname} 0 ${_sl} _libname)
#message("qad lib \"${_libname}\"")
list(APPEND _qt_libs ${_libname})
endif()
endif()
endforeach()
if (NOT "x${_qt_libs}" STREQUAL "x")
list(APPEND _qt_libs "qtbase")
foreach (_i ${${PROJECT_NAME}_LANG})
foreach (_l ${_qt_libs})
unset(_qm_path CACHE)
find_file(_qm_path "${_l}_${_i}.qm" PATHS "${Qt${_v}_LANG_DIR}" ${_PATHS} NO_DEFAULT_PATH)
if (EXISTS "${_qm_path}")
install(FILES ${_qm_path} DESTINATION "${_DEST}")
#message("qm = \"${_qm_path}\"")
endif()
endforeach()
endforeach()
endif()
endif()
endforeach()
endmacro()
macro(qt_get_target _NAME _OUT)
set(${_OUT})
set(_ver)
foreach(_i ${ARGN})
foreach(_v ${_QT_VERSIONS_})
if ("x${_i}" STREQUAL "xQt${_v}")
set(_ver ${_v})
break()
endif()
endforeach()
if (NOT "x${_ver}" STREQUAL "x")
break()
endif()
endforeach()
foreach(_v ${_QT_VERSIONS_})
if (LOCAL_FOUND${_v} AND (("x${_ver}" STREQUAL "x") OR ((NOT "x${_ver}" STREQUAL "x") AND ("x${_ver}" STREQUAL "x${_v}"))))
set(${_OUT} ${_NAME}${TARGET_SUFFIX_Qt${_v}})
endif()
endforeach()
endmacro()
macro(qt_get_targets _NAME _OUT)
set(${_OUT})
foreach(_v ${_QT_VERSIONS_})
if (LOCAL_FOUND${_v})
list(APPEND ${_OUT} ${_NAME}${TARGET_SUFFIX_Qt${_v}})
endif()
endforeach()
endmacro()
macro(qt_generate_export_header _NAME)
qt_get_target(${_NAME} _some_target)
qt_get_target(${_NAME} _targets)
foreach(_t ${_targets})
set_target_properties(${_t} PROPERTIES DEFINE_SYMBOL ${_NAME}_EXPORTS)
endforeach()
set_target_properties(${_some_target} PROPERTIES DEFINE_SYMBOL ${_NAME}_EXPORTS)
generate_export_header(${_some_target} BASE_NAME "${_NAME}" ${ARGN})
endmacro()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 992 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 943 B

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 943 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 419 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 717 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 448 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Some files were not shown because too many files have changed in this diff Show More