git-svn-id: svn://db.shs.com.ru/libs@945 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -38,11 +38,12 @@ if %~2==x86_64 (
|
||||
set AARCH=x86_64
|
||||
if /i %_PLATFORM_% LSS 21 set _PLATFORM_=21
|
||||
)
|
||||
set Qt5_ROOT=%ANDROID_QT5_DIR%\android_%QARCH%\lib\cmake
|
||||
set Qt5_DIR=%Qt5_ROOT%\Qt5
|
||||
rem set Qt5_ROOT=%ANDROID_QT5_DIR%\android_%QARCH%\lib\cmake
|
||||
set Qt5_ROOT=%ANDROID_QT5_DIR%\lib\cmake
|
||||
rem set Qt5_DIR=%Qt5_ROOT%\Qt5
|
||||
if NOT [%QARCH%]==[] (
|
||||
@echo on
|
||||
cmake_mgw -Wno-dev -DCMAKE_TOOLCHAIN_FILE=%ANDROID_NDK_HOME%\build\cmake\android.toolchain.cmake -DANDROID_STL=c++_shared -DANDROID_PLATFORM=android-%_PLATFORM_% -DANDROID_ABI=%AARCH% -DICU=0 -DQt4=0 -DQt5=1 -DQGLVIEW=0 -DQt5_DIR=%Qt5_ROOT%\Qt5 -DQt5LinguistTools_DIR=%Qt5_ROOT%\Qt5LinguistTools -DQt5UiPlugin_DIR=%Qt5_ROOT%\Qt5UiPlugin -DQt5Widgets_DIR=%Qt5_ROOT%\Qt5Widgets -DQt5Core_DIR=%Qt5_ROOT%\Qt5Core -DQt5Gui_DIR=%Qt5_ROOT%\Qt5Gui -DQt5Sql_DIR=%Qt5_ROOT%\Qt5Sql -DQt5OpenGL_DIR=%Qt5_ROOT%\Qt5OpenGL -DQt5PrintSupport_DIR=%Qt5_ROOT%\Qt5PrintSupport -DQt5Script_DIR=%Qt5_ROOT%\Qt5Script -DQt5Positioning_DIR=%Qt5_ROOT%\Qt5Positioning -DQt5Network_DIR=%Qt5_ROOT%\Qt5Network -DQt5Qml_DIR=%Qt5_ROOT%\Qt5Qml -DQt5Quick_DIR=%Qt5_ROOT%\Qt5Quick -DQt5QuickWidgets_DIR=%Qt5_ROOT%\Qt5QuickWidgets %~3 %~4 %~5 %~6
|
||||
cmake_mgw -Wno-dev -DCMAKE_TOOLCHAIN_FILE=%ANDROID_NDK_HOME%\build\cmake\android.toolchain.cmake -DANDROID_STL=c++_shared -DANDROID_PLATFORM=android-%_PLATFORM_% -DANDROID_ABI=%AARCH% -DICU=0 -DQt4=0 -DQt5=1 -DQGLVIEW=0 -DQGLENGINE=0 -DQt5_DIR=%Qt5_ROOT%\Qt5 -DQt5LinguistTools_DIR=%Qt5_ROOT%\Qt5LinguistTools -DQt5UiPlugin_DIR=%Qt5_ROOT%\Qt5UiPlugin -DQt5UiTools_DIR=%Qt5_ROOT%\Qt5UiTools -DQt5Widgets_DIR=%Qt5_ROOT%\Qt5Widgets -DQt5Core_DIR=%Qt5_ROOT%\Qt5Core -DQt5Gui_DIR=%Qt5_ROOT%\Qt5Gui -DQt5Sql_DIR=%Qt5_ROOT%\Qt5Sql -DQt5OpenGL_DIR=%Qt5_ROOT%\Qt5OpenGL -DQt5PrintSupport_DIR=%Qt5_ROOT%\Qt5PrintSupport -DQt5Script_DIR=%Qt5_ROOT%\Qt5Script -DQt5Positioning_DIR=%Qt5_ROOT%\Qt5Positioning -DQt5Network_DIR=%Qt5_ROOT%\Qt5Network -DQt5Qml_DIR=%Qt5_ROOT%\Qt5Qml -DQt5Quick_DIR=%Qt5_ROOT%\Qt5Quick -DQt5QuickWidgets_DIR=%Qt5_ROOT%\Qt5QuickWidgets %~3 %~4 %~5 %~6
|
||||
) else (
|
||||
@echo on
|
||||
cmake_mgw -Wno-dev -DCMAKE_TOOLCHAIN_FILE=%ANDROID_NDK_HOME%\build\cmake\android.toolchain.cmake -DANDROID_STL=c++_shared -DANDROID_PLATFORM=android-%_PLATFORM_% -DANDROID_ABI=%AARCH% -DICU=0 -DQt4=0 -DQt5=0 -DQGLVIEW=0 %~3 %~4 %~5 %~6
|
||||
|
||||
@@ -1,105 +1,107 @@
|
||||
# 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>)
|
||||
#
|
||||
# Search Qt translations for all <name> dependencies
|
||||
# in Qt<?>_LANG_DIR for <name>_LANG languages
|
||||
# and install them to <dir>. You can you "set_lang()" macro
|
||||
# before this action
|
||||
#
|
||||
#
|
||||
#[[
|
||||
|
||||
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>)
|
||||
|
||||
Search Qt translations for all <name> dependencies
|
||||
in Qt<?>_LANG_DIR for <name>_LANG languages
|
||||
and install them to <dir>. You can you "set_lang()" macro
|
||||
before this action
|
||||
|
||||
]]
|
||||
|
||||
|
||||
cmake_policy(SET CMP0011 NEW) # don`t affect includer policies
|
||||
|
||||
Reference in New Issue
Block a user