Apply cmake-format 0.5.1
This commit is contained in:
parent
e32f3c9dad
commit
ec3d68a635
|
@ -171,7 +171,8 @@ else ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# find c++utilities
|
# find c++utilities
|
||||||
set(CONFIGURATION_PACKAGE_SUFFIX ""
|
set(CONFIGURATION_PACKAGE_SUFFIX
|
||||||
|
""
|
||||||
CACHE STRING "sets the suffix for find_package() calls to packages configured via c++utilities")
|
CACHE STRING "sets the suffix for find_package() calls to packages configured via c++utilities")
|
||||||
find_package(c++utilities${CONFIGURATION_PACKAGE_SUFFIX} 5.0.0 REQUIRED)
|
find_package(c++utilities${CONFIGURATION_PACKAGE_SUFFIX} 5.0.0 REQUIRED)
|
||||||
use_cpp_utilities()
|
use_cpp_utilities()
|
||||||
|
|
|
@ -31,10 +31,7 @@ if (NOT EXISTS "${ANDROID_APK_MANIFEST_PATH}")
|
||||||
message(FATAL_ERROR "The Android manifest doesn't exist at \"${ANDROID_APK_SUBDIR}/AndroidManifest.xml\".")
|
message(FATAL_ERROR "The Android manifest doesn't exist at \"${ANDROID_APK_SUBDIR}/AndroidManifest.xml\".")
|
||||||
endif ()
|
endif ()
|
||||||
# caveat: adding new files or removing files requires to re-run CMake manually
|
# caveat: adding new files or removing files requires to re-run CMake manually
|
||||||
file(GLOB_RECURSE ANDROID_APK_FILES
|
file(GLOB_RECURSE ANDROID_APK_FILES LIST_DIRECTORIES false "${ANDROID_APK_SUBDIR}/*")
|
||||||
LIST_DIRECTORIES
|
|
||||||
false
|
|
||||||
"${ANDROID_APK_SUBDIR}/*")
|
|
||||||
|
|
||||||
# make subdirectory to store build artefacts for APK
|
# make subdirectory to store build artefacts for APK
|
||||||
set(ANDROID_APK_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/apk")
|
set(ANDROID_APK_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/apk")
|
||||||
|
@ -67,8 +64,10 @@ if (NOT ANDROID_APK_TOOLCHAIN_VERSION)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# determine Android build tools version note: Assuming the build tools are installed under "${CMAKE_ANDROID_SDK}/build-tools"
|
# determine Android build tools version note: Assuming the build tools are installed under "${CMAKE_ANDROID_SDK}/build-tools"
|
||||||
file(GLOB ANDROID_APK_BUILD_TOOLS_VERSIONS LIST_DIRECTORIES TRUE
|
file(GLOB ANDROID_APK_BUILD_TOOLS_VERSIONS
|
||||||
RELATIVE "${CMAKE_ANDROID_SDK}/build-tools" "${CMAKE_ANDROID_SDK}/build-tools/*")
|
LIST_DIRECTORIES TRUE
|
||||||
|
RELATIVE "${CMAKE_ANDROID_SDK}/build-tools"
|
||||||
|
"${CMAKE_ANDROID_SDK}/build-tools/*")
|
||||||
if (NOT ANDROID_APK_BUILD_TOOLS_VERSIONS)
|
if (NOT ANDROID_APK_BUILD_TOOLS_VERSIONS)
|
||||||
message(FATAL_ERROR "No build-tools present under \"${CMAKE_ANDROID_SDK}/build-tools\".")
|
message(FATAL_ERROR "No build-tools present under \"${CMAKE_ANDROID_SDK}/build-tools\".")
|
||||||
endif ()
|
endif ()
|
||||||
|
@ -105,11 +104,14 @@ foreach (PATH ${ANDROID_APK_BINARY_DIRS})
|
||||||
# symlink "lib" subdirectory so androiddeployqt finds the library in the runtime path when specified via
|
# symlink "lib" subdirectory so androiddeployqt finds the library in the runtime path when specified via
|
||||||
# "extraPrefixDirs"
|
# "extraPrefixDirs"
|
||||||
list(APPEND ANDROID_APK_BINARY_DIRS_DEPENDS "${PATH}/lib")
|
list(APPEND ANDROID_APK_BINARY_DIRS_DEPENDS "${PATH}/lib")
|
||||||
add_custom_command(OUTPUT "${PATH}/lib"
|
add_custom_command(OUTPUT "${PATH}/lib" COMMAND "${CMAKE_COMMAND}" -E create_symlink "${PATH}" "${PATH}/lib")
|
||||||
COMMAND "${CMAKE_COMMAND}" -E create_symlink "${PATH}" "${PATH}/lib")
|
|
||||||
endforeach ()
|
endforeach ()
|
||||||
include(ListToString)
|
include(ListToString)
|
||||||
list_to_string("" "\n \"" "\"," "${ANDROID_APK_BINARY_DIRS}" ANDROID_APK_BINARY_DIRS)
|
list_to_string(""
|
||||||
|
"\n \""
|
||||||
|
"\","
|
||||||
|
"${ANDROID_APK_BINARY_DIRS}"
|
||||||
|
ANDROID_APK_BINARY_DIRS)
|
||||||
|
|
||||||
# find dependencies note: androiddeployqt seems to find only Qt libraries and plugins but misses other target_link_libraries
|
# find dependencies note: androiddeployqt seems to find only Qt libraries and plugins but misses other target_link_libraries
|
||||||
set(ANDROID_APK_ADDITIONAL_LIBS "" CACHE STRING "additional libraries to be bundled into the Android APK")
|
set(ANDROID_APK_ADDITIONAL_LIBS "" CACHE STRING "additional libraries to be bundled into the Android APK")
|
||||||
|
@ -135,10 +137,17 @@ function (add_android_apk_extra_libs TARGET_NAME)
|
||||||
set(ANDROID_APK_EXTRA_LIBS "${ANDROID_APK_EXTRA_LIBS}" PARENT_SCOPE)
|
set(ANDROID_APK_EXTRA_LIBS "${ANDROID_APK_EXTRA_LIBS}" PARENT_SCOPE)
|
||||||
endfunction ()
|
endfunction ()
|
||||||
add_android_apk_extra_libs("${META_TARGET_NAME}")
|
add_android_apk_extra_libs("${META_TARGET_NAME}")
|
||||||
list_to_string("," "" "" "${ANDROID_APK_EXTRA_LIBS}" ANDROID_APK_EXTRA_LIBS)
|
list_to_string(","
|
||||||
|
""
|
||||||
|
""
|
||||||
|
"${ANDROID_APK_EXTRA_LIBS}"
|
||||||
|
ANDROID_APK_EXTRA_LIBS)
|
||||||
|
|
||||||
# query certain qmake variables
|
# query certain qmake variables
|
||||||
foreach (QMAKE_VARIABLE QT_INSTALL_QML QT_INSTALL_PLUGINS QT_INSTALL_IMPORTS)
|
foreach (QMAKE_VARIABLE
|
||||||
|
QT_INSTALL_QML
|
||||||
|
QT_INSTALL_PLUGINS
|
||||||
|
QT_INSTALL_IMPORTS)
|
||||||
query_qmake_variable(${QMAKE_VARIABLE})
|
query_qmake_variable(${QMAKE_VARIABLE})
|
||||||
endforeach ()
|
endforeach ()
|
||||||
|
|
||||||
|
@ -148,7 +157,11 @@ function (compose_dirs_for_android_apk)
|
||||||
set(OPTIONAL_ARGS)
|
set(OPTIONAL_ARGS)
|
||||||
set(ONE_VALUE_ARGS OUTPUT_VARIABLE)
|
set(ONE_VALUE_ARGS OUTPUT_VARIABLE)
|
||||||
set(MULTI_VALUE_ARGS POSSIBLE_DIRS)
|
set(MULTI_VALUE_ARGS POSSIBLE_DIRS)
|
||||||
cmake_parse_arguments(ARGS "${OPTIONAL_ARGS}" "${ONE_VALUE_ARGS}" "${MULTI_VALUE_ARGS}" ${ARGN})
|
cmake_parse_arguments(ARGS
|
||||||
|
"${OPTIONAL_ARGS}"
|
||||||
|
"${ONE_VALUE_ARGS}"
|
||||||
|
"${MULTI_VALUE_ARGS}"
|
||||||
|
${ARGN})
|
||||||
|
|
||||||
list(REMOVE_DUPLICATES ARGS_POSSIBLE_DIRS)
|
list(REMOVE_DUPLICATES ARGS_POSSIBLE_DIRS)
|
||||||
unset(DIRS)
|
unset(DIRS)
|
||||||
|
@ -158,7 +171,11 @@ function (compose_dirs_for_android_apk)
|
||||||
endif ()
|
endif ()
|
||||||
endforeach ()
|
endforeach ()
|
||||||
|
|
||||||
list_to_string("," "" "" "${DIRS}" DIRS)
|
list_to_string(","
|
||||||
|
""
|
||||||
|
""
|
||||||
|
"${DIRS}"
|
||||||
|
DIRS)
|
||||||
set("${ARGS_OUTPUT_VARIABLE}" "${DIRS}" PARENT_SCOPE)
|
set("${ARGS_OUTPUT_VARIABLE}" "${DIRS}" PARENT_SCOPE)
|
||||||
endfunction ()
|
endfunction ()
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,11 @@ foreach (MODULE ${QT_MODULES})
|
||||||
if ("${MODULE}" IN_LIST META_PUBLIC_QT_MODULES)
|
if ("${MODULE}" IN_LIST META_PUBLIC_QT_MODULES)
|
||||||
list(APPEND MODULE_OPTIONS VISIBILITY PUBLIC)
|
list(APPEND MODULE_OPTIONS VISIBILITY PUBLIC)
|
||||||
endif ()
|
endif ()
|
||||||
use_qt_module(PREFIX "${QT_PACKAGE_PREFIX}" MODULE "${MODULE}" ${MODULE_OPTIONS})
|
use_qt_module(PREFIX
|
||||||
|
"${QT_PACKAGE_PREFIX}"
|
||||||
|
MODULE
|
||||||
|
"${MODULE}"
|
||||||
|
${MODULE_OPTIONS})
|
||||||
endforeach ()
|
endforeach ()
|
||||||
set(KF_PACKAGE_PREFIX "KF5" CACHE STRING "specifies the prefix for KDE Frameworks packages")
|
set(KF_PACKAGE_PREFIX "KF5" CACHE STRING "specifies the prefix for KDE Frameworks packages")
|
||||||
foreach (MODULE ${KF_MODULES})
|
foreach (MODULE ${KF_MODULES})
|
||||||
|
@ -71,7 +75,11 @@ foreach (MODULE ${KF_MODULES})
|
||||||
if ("${MODULE}" IN_LIST META_PUBLIC_KF_MODULES)
|
if ("${MODULE}" IN_LIST META_PUBLIC_KF_MODULES)
|
||||||
list(APPEND MODULE_OPTIONS VISIBILITY PUBLIC)
|
list(APPEND MODULE_OPTIONS VISIBILITY PUBLIC)
|
||||||
endif ()
|
endif ()
|
||||||
use_qt_module(PREFIX "${KF_PACKAGE_PREFIX}" MODULE "${MODULE}" ${MODULE_OPTIONS})
|
use_qt_module(PREFIX
|
||||||
|
"${KF_PACKAGE_PREFIX}"
|
||||||
|
MODULE
|
||||||
|
"${MODULE}"
|
||||||
|
${MODULE_OPTIONS})
|
||||||
endforeach ()
|
endforeach ()
|
||||||
|
|
||||||
# hack for using static Qt via "StaticQt5" prefix: find regular Qt5Core module as well so Qt version is defined
|
# hack for using static Qt via "StaticQt5" prefix: find regular Qt5Core module as well so Qt version is defined
|
||||||
|
@ -97,11 +105,29 @@ if (STATIC_LINKAGE AND META_PROJECT_IS_APPLICATION)
|
||||||
|
|
||||||
if (Gui IN_LIST QT_MODULES OR Widgets IN_LIST QT_MODULES OR Quick IN_LIST QT_MODULES)
|
if (Gui IN_LIST QT_MODULES OR Widgets IN_LIST QT_MODULES OR Quick IN_LIST QT_MODULES)
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
use_qt_module(PREFIX "${QT_PACKAGE_PREFIX}" MODULE Gui PLUGINS WindowsIntegration ONLY_PLUGINS)
|
use_qt_module(PREFIX
|
||||||
|
"${QT_PACKAGE_PREFIX}"
|
||||||
|
MODULE
|
||||||
|
Gui
|
||||||
|
PLUGINS
|
||||||
|
WindowsIntegration
|
||||||
|
ONLY_PLUGINS)
|
||||||
elseif (APPLE)
|
elseif (APPLE)
|
||||||
use_qt_module(PREFIX "${QT_PACKAGE_PREFIX}" MODULE Gui PLUGINS CocoaIntegration ONLY_PLUGINS)
|
use_qt_module(PREFIX
|
||||||
|
"${QT_PACKAGE_PREFIX}"
|
||||||
|
MODULE
|
||||||
|
Gui
|
||||||
|
PLUGINS
|
||||||
|
CocoaIntegration
|
||||||
|
ONLY_PLUGINS)
|
||||||
elseif (TARGET ${QT5_Gui_STATIC_PREFIX}QXcbIntegrationPlugin)
|
elseif (TARGET ${QT5_Gui_STATIC_PREFIX}QXcbIntegrationPlugin)
|
||||||
use_qt_module(PREFIX "${QT_PACKAGE_PREFIX}" MODULE Gui PLUGINS XcbIntegration ONLY_PLUGINS)
|
use_qt_module(PREFIX
|
||||||
|
"${QT_PACKAGE_PREFIX}"
|
||||||
|
MODULE
|
||||||
|
Gui
|
||||||
|
PLUGINS
|
||||||
|
XcbIntegration
|
||||||
|
ONLY_PLUGINS)
|
||||||
else ()
|
else ()
|
||||||
message(WARNING "The required platform plugin for your platform is unknown an can not be linked in statically.")
|
message(WARNING "The required platform plugin for your platform is unknown an can not be linked in statically.")
|
||||||
endif ()
|
endif ()
|
||||||
|
@ -114,7 +140,13 @@ if (STATIC_LINKAGE AND META_PROJECT_IS_APPLICATION)
|
||||||
if (Widgets IN_LIST QT_MODULES)
|
if (Widgets IN_LIST QT_MODULES)
|
||||||
foreach (WIDGET_STYLE_PLUGIN ${KNOWN_WIDGET_STYLE_PLUGINS})
|
foreach (WIDGET_STYLE_PLUGIN ${KNOWN_WIDGET_STYLE_PLUGINS})
|
||||||
if (TARGET "${QT_PACKAGE_PREFIX}::Q${WIDGET_STYLE_PLUGIN}Plugin")
|
if (TARGET "${QT_PACKAGE_PREFIX}::Q${WIDGET_STYLE_PLUGIN}Plugin")
|
||||||
use_qt_module(PREFIX "${QT_PACKAGE_PREFIX}" MODULE Widgets PLUGINS ${WIDGET_STYLE_PLUGIN} ONLY_PLUGINS)
|
use_qt_module(PREFIX
|
||||||
|
"${QT_PACKAGE_PREFIX}"
|
||||||
|
MODULE
|
||||||
|
Widgets
|
||||||
|
PLUGINS
|
||||||
|
${WIDGET_STYLE_PLUGIN}
|
||||||
|
ONLY_PLUGINS)
|
||||||
list(APPEND USED_WIDGET_STYLE_PLUGINS "${WIDGET_STYLE_PLUGIN}")
|
list(APPEND USED_WIDGET_STYLE_PLUGINS "${WIDGET_STYLE_PLUGIN}")
|
||||||
endif ()
|
endif ()
|
||||||
endforeach ()
|
endforeach ()
|
||||||
|
@ -137,27 +169,48 @@ if (STATIC_LINKAGE AND META_PROJECT_IS_APPLICATION)
|
||||||
set(SVG_SUPPORT ON)
|
set(SVG_SUPPORT ON)
|
||||||
list(REMOVE_ITEM IMAGE_FORMAT_SUPPORT Svg)
|
list(REMOVE_ITEM IMAGE_FORMAT_SUPPORT Svg)
|
||||||
else ()
|
else ()
|
||||||
use_qt_module(PREFIX "${QT_PACKAGE_PREFIX}" MODULE Gui PLUGINS ${IMAGE_FORMAT} ONLY_PLUGINS)
|
use_qt_module(PREFIX
|
||||||
|
"${QT_PACKAGE_PREFIX}"
|
||||||
|
MODULE
|
||||||
|
Gui
|
||||||
|
PLUGINS
|
||||||
|
${IMAGE_FORMAT}
|
||||||
|
ONLY_PLUGINS)
|
||||||
endif ()
|
endif ()
|
||||||
endforeach ()
|
endforeach ()
|
||||||
|
|
||||||
# allow importing image format plugins via config.h
|
# allow importing image format plugins via config.h
|
||||||
list_to_string(" " "\\\n Q_IMPORT_PLUGIN(Q" "Plugin)" "${IMAGE_FORMAT_SUPPORT}" IMAGE_FORMAT_SUPPORT_ARRAY)
|
list_to_string(" "
|
||||||
|
"\\\n Q_IMPORT_PLUGIN(Q"
|
||||||
|
"Plugin)"
|
||||||
|
"${IMAGE_FORMAT_SUPPORT}"
|
||||||
|
IMAGE_FORMAT_SUPPORT_ARRAY)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# ensure SVG plugins are built-in if configured
|
# ensure SVG plugins are built-in if configured
|
||||||
if ((SVG_SUPPORT OR SVG_ICON_SUPPORT)
|
if ((SVG_SUPPORT OR SVG_ICON_SUPPORT) AND NOT Svg IN_LIST QT_MODULES)
|
||||||
AND NOT
|
use_qt_module(PREFIX
|
||||||
Svg
|
"${QT_PACKAGE_PREFIX}"
|
||||||
IN_LIST
|
MODULE
|
||||||
QT_MODULES)
|
Svg)
|
||||||
use_qt_module(PREFIX "${QT_PACKAGE_PREFIX}" MODULE Svg)
|
|
||||||
endif ()
|
endif ()
|
||||||
if (SVG_SUPPORT)
|
if (SVG_SUPPORT)
|
||||||
use_qt_module(PREFIX "${QT_PACKAGE_PREFIX}" MODULE Svg PLUGINS Svg ONLY_PLUGINS)
|
use_qt_module(PREFIX
|
||||||
|
"${QT_PACKAGE_PREFIX}"
|
||||||
|
MODULE
|
||||||
|
Svg
|
||||||
|
PLUGINS
|
||||||
|
Svg
|
||||||
|
ONLY_PLUGINS)
|
||||||
endif ()
|
endif ()
|
||||||
if (SVG_ICON_SUPPORT)
|
if (SVG_ICON_SUPPORT)
|
||||||
use_qt_module(PREFIX "${QT_PACKAGE_PREFIX}" MODULE Svg PLUGINS SvgIcon ONLY_PLUGINS)
|
use_qt_module(PREFIX
|
||||||
|
"${QT_PACKAGE_PREFIX}"
|
||||||
|
MODULE
|
||||||
|
Svg
|
||||||
|
PLUGINS
|
||||||
|
SvgIcon
|
||||||
|
ONLY_PLUGINS)
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
@ -199,7 +252,11 @@ foreach (QT_TRANSLATION_PATH ${QT_TRANSLATION_SEARCH_PATHS})
|
||||||
endforeach ()
|
endforeach ()
|
||||||
|
|
||||||
# make relevant Qt translations available as array via config.h
|
# make relevant Qt translations available as array via config.h
|
||||||
list_to_string("," " \\\n QStringLiteral(\"" "\")" "${QT_TRANSLATION_FILES}" QT_TRANSLATION_FILES_ARRAY)
|
list_to_string(","
|
||||||
|
" \\\n QStringLiteral(\""
|
||||||
|
"\")"
|
||||||
|
"${QT_TRANSLATION_FILES}"
|
||||||
|
QT_TRANSLATION_FILES_ARRAY)
|
||||||
|
|
||||||
# enable lrelease and add install target for localization
|
# enable lrelease and add install target for localization
|
||||||
option(ENABLE_QT_TRANSLATIONS "specifies whether Qt translations should be updated/released" ON)
|
option(ENABLE_QT_TRANSLATIONS "specifies whether Qt translations should be updated/released" ON)
|
||||||
|
@ -238,7 +295,8 @@ if (ENABLE_QT_TRANSLATIONS AND TS_FILES)
|
||||||
if (NOT TARGET install-localization)
|
if (NOT TARGET install-localization)
|
||||||
set(LOCALIZATION_TARGET "install-localization")
|
set(LOCALIZATION_TARGET "install-localization")
|
||||||
add_custom_target(${LOCALIZATION_TARGET}
|
add_custom_target(${LOCALIZATION_TARGET}
|
||||||
COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=localization -P
|
COMMAND "${CMAKE_COMMAND}"
|
||||||
|
-DCMAKE_INSTALL_COMPONENT=localization -P
|
||||||
"${CMAKE_BINARY_DIR}/cmake_install.cmake")
|
"${CMAKE_BINARY_DIR}/cmake_install.cmake")
|
||||||
add_dependencies(${LOCALIZATION_TARGET} ${META_PROJECT_NAME}_translations)
|
add_dependencies(${LOCALIZATION_TARGET} ${META_PROJECT_NAME}_translations)
|
||||||
endif ()
|
endif ()
|
||||||
|
@ -321,16 +379,11 @@ if (REQUIRED_ICONS)
|
||||||
# find index files
|
# find index files
|
||||||
if (NOT ICON_THEME STREQUAL FALLBACK_ICON_THEME)
|
if (NOT ICON_THEME STREQUAL FALLBACK_ICON_THEME)
|
||||||
file(GLOB GLOBBED_ICON_THEME_INDEX_FILES
|
file(GLOB GLOBBED_ICON_THEME_INDEX_FILES
|
||||||
LIST_DIRECTORIES
|
LIST_DIRECTORIES false
|
||||||
false
|
"${ICON_THEME_PATH}/index.theme" "${ICON_THEME_PATH}/icon-theme.cache")
|
||||||
"${ICON_THEME_PATH}/index.theme"
|
|
||||||
"${ICON_THEME_PATH}/icon-theme.cache")
|
|
||||||
else ()
|
else ()
|
||||||
# only index.theme required when icons are provided as fallback anyways
|
# only index.theme required when icons are provided as fallback anyways
|
||||||
file(GLOB GLOBBED_ICON_THEME_INDEX_FILES
|
file(GLOB GLOBBED_ICON_THEME_INDEX_FILES LIST_DIRECTORIES false "${ICON_THEME_PATH}/index.theme")
|
||||||
LIST_DIRECTORIES
|
|
||||||
false
|
|
||||||
"${ICON_THEME_PATH}/index.theme")
|
|
||||||
endif ()
|
endif ()
|
||||||
# make the first specified built-in the default theme
|
# make the first specified built-in the default theme
|
||||||
if (NOT EXISTS "${DEFAULT_THEME_INDEX_FILE}")
|
if (NOT EXISTS "${DEFAULT_THEME_INDEX_FILE}")
|
||||||
|
@ -348,10 +401,7 @@ if (REQUIRED_ICONS)
|
||||||
"${ICON_THEME_PATH}/*/${REQUIRED_ICON}"
|
"${ICON_THEME_PATH}/*/${REQUIRED_ICON}"
|
||||||
"${ICON_THEME_PATH}/*/${REQUIRED_ICON}.*")
|
"${ICON_THEME_PATH}/*/${REQUIRED_ICON}.*")
|
||||||
endforeach ()
|
endforeach ()
|
||||||
file(GLOB_RECURSE GLOBBED_ICON_THEME_FILES
|
file(GLOB_RECURSE GLOBBED_ICON_THEME_FILES LIST_DIRECTORIES false ${GLOB_PATTERNS})
|
||||||
LIST_DIRECTORIES
|
|
||||||
false
|
|
||||||
${GLOB_PATTERNS})
|
|
||||||
else ()
|
else ()
|
||||||
message(
|
message(
|
||||||
STATUS
|
STATUS
|
||||||
|
|
|
@ -83,7 +83,8 @@ list(APPEND ADDITIONAL_HEADER_FILES ${GUI_HEADER_FILES})
|
||||||
# add option for enabling/disabling static Qt plugins
|
# add option for enabling/disabling static Qt plugins
|
||||||
option(SVG_SUPPORT "whether to link against the SVG image format plugin (only relevant when using static Qt)" ON)
|
option(SVG_SUPPORT "whether to link against the SVG image format plugin (only relevant when using static Qt)" ON)
|
||||||
option(SVG_ICON_SUPPORT "whether to link against the SVG icon engine (only relevant when using static Qt)" ON)
|
option(SVG_ICON_SUPPORT "whether to link against the SVG icon engine (only relevant when using static Qt)" ON)
|
||||||
set(IMAGE_FORMAT_SUPPORT "Gif;ICO;Jpeg"
|
set(IMAGE_FORMAT_SUPPORT
|
||||||
|
"Gif;ICO;Jpeg"
|
||||||
CACHE STRING "specifies the image format plugins to link against (only relevant when using static Qt)")
|
CACHE STRING "specifies the image format plugins to link against (only relevant when using static Qt)")
|
||||||
|
|
||||||
# always enable the Svg module under Android
|
# always enable the Svg module under Android
|
||||||
|
|
|
@ -20,9 +20,17 @@ endif ()
|
||||||
macro (use_qt_module)
|
macro (use_qt_module)
|
||||||
# parse arguments
|
# parse arguments
|
||||||
set(OPTIONAL_ARGS ONLY_PLUGINS)
|
set(OPTIONAL_ARGS ONLY_PLUGINS)
|
||||||
set(ONE_VALUE_ARGS PREFIX MODULE VISIBILITY LIBRARIES_VARIABLE)
|
set(ONE_VALUE_ARGS
|
||||||
|
PREFIX
|
||||||
|
MODULE
|
||||||
|
VISIBILITY
|
||||||
|
LIBRARIES_VARIABLE)
|
||||||
set(MULTI_VALUE_ARGS TARGETS PLUGINS)
|
set(MULTI_VALUE_ARGS TARGETS PLUGINS)
|
||||||
cmake_parse_arguments(ARGS "${OPTIONAL_ARGS}" "${ONE_VALUE_ARGS}" "${MULTI_VALUE_ARGS}" ${ARGN})
|
cmake_parse_arguments(ARGS
|
||||||
|
"${OPTIONAL_ARGS}"
|
||||||
|
"${ONE_VALUE_ARGS}"
|
||||||
|
"${MULTI_VALUE_ARGS}"
|
||||||
|
${ARGN})
|
||||||
|
|
||||||
# validate values
|
# validate values
|
||||||
if (NOT ARGS_PREFIX)
|
if (NOT ARGS_PREFIX)
|
||||||
|
@ -91,7 +99,10 @@ macro (use_qt_module)
|
||||||
endforeach ()
|
endforeach ()
|
||||||
|
|
||||||
# unset variables (can not simply use a function because Qt's variables need to be exported)
|
# unset variables (can not simply use a function because Qt's variables need to be exported)
|
||||||
foreach (ARGUMENT ${OPTIONAL_ARGS} ${ONE_VALUE_ARGS} ${MULTI_VALUE_ARGS})
|
foreach (ARGUMENT
|
||||||
|
${OPTIONAL_ARGS}
|
||||||
|
${ONE_VALUE_ARGS}
|
||||||
|
${MULTI_VALUE_ARGS})
|
||||||
unset(ARGS_${ARGUMENT})
|
unset(ARGS_${ARGUMENT})
|
||||||
endforeach ()
|
endforeach ()
|
||||||
endmacro ()
|
endmacro ()
|
||||||
|
|
Loading…
Reference in New Issue