git-svn-id: svn://db.shs.com.ru/libs@894 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -1,3 +1,96 @@
|
||||
# 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_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(<target> ... <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(...)
|
||||
#
|
||||
# Syntax similar to original "target_compile_definitions()"
|
||||
# Specify compile definitions to use when compiling a given <target>
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# qt_target_include_directories(...)
|
||||
#
|
||||
# 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)"
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
cmake_policy(SET CMP0011 NEW) # don`t affect includer policies
|
||||
cmake_policy(SET CMP0020 NEW) # Automatically link Qt executables to qtmain target on Windows
|
||||
|
||||
@@ -16,12 +109,6 @@ endif()
|
||||
#set(TARGET_SUFFIX_Qt4 "")
|
||||
|
||||
|
||||
# usage: 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
|
||||
macro(find_qt)
|
||||
set(_QCOMP)
|
||||
foreach(_v ${_QT_VERSIONS_})
|
||||
@@ -139,11 +226,6 @@ macro(find_qt)
|
||||
endmacro()
|
||||
|
||||
|
||||
# usage: 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
|
||||
macro(qt_sources OUT)
|
||||
set(${OUT})
|
||||
set(_DIR "")
|
||||
@@ -184,10 +266,6 @@ macro(qt_sources OUT)
|
||||
endmacro()
|
||||
|
||||
|
||||
# usage: 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
|
||||
macro(qt_wrap)
|
||||
set(HDR_VAR)
|
||||
set(CPP_VAR)
|
||||
@@ -353,10 +431,6 @@ macro(_qt_split_add_args _P _A)
|
||||
endmacro()
|
||||
|
||||
|
||||
# usage: 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
|
||||
macro(qt_add_executable _NAME)
|
||||
foreach(_v ${_QT_VERSIONS_})
|
||||
if (LOCAL_FOUND${_v})
|
||||
@@ -395,10 +469,6 @@ macro(qt_add_executable _NAME)
|
||||
endmacro()
|
||||
|
||||
|
||||
# usage: 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
|
||||
macro(qt_add_library _NAME)
|
||||
foreach(_v ${_QT_VERSIONS_})
|
||||
if (LOCAL_FOUND${_v})
|
||||
@@ -447,11 +517,6 @@ macro(_qt_multitarget_suffix_ _OUT _IN _v)
|
||||
endmacro()
|
||||
|
||||
|
||||
# usage: qt_target_link_libraries(<target> ... <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?>
|
||||
macro(qt_target_link_libraries _NAME)
|
||||
foreach(_v ${_QT_VERSIONS_})
|
||||
if (LOCAL_FOUND${_v})
|
||||
@@ -474,8 +539,6 @@ macro(qt_target_link_libraries _NAME)
|
||||
endmacro()
|
||||
|
||||
|
||||
# usage: qt_target_compile_definitions(...), syntax similar to original "target_compile_definitions()"
|
||||
# Specify compile definitions to use when compiling a given <target>
|
||||
macro(qt_target_compile_definitions _NAME)
|
||||
foreach(_v ${_QT_VERSIONS_})
|
||||
if (LOCAL_FOUND${_v})
|
||||
@@ -486,8 +549,6 @@ macro(qt_target_compile_definitions _NAME)
|
||||
endmacro()
|
||||
|
||||
|
||||
# usage: qt_target_include_directories(...), syntax similar to original "target_include_directories()"
|
||||
# Add include directories to a target
|
||||
macro(qt_target_include_directories _NAME)
|
||||
foreach(_v ${_QT_VERSIONS_})
|
||||
if (LOCAL_FOUND${_v})
|
||||
@@ -498,15 +559,6 @@ macro(qt_target_include_directories _NAME)
|
||||
endmacro()
|
||||
|
||||
|
||||
# usage: 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
|
||||
macro(qt_install)
|
||||
set(_prev_inst)
|
||||
#message("command: ${ARGN}")
|
||||
|
||||
Reference in New Issue
Block a user