diff --git a/cmake/DeployMacros.cmake b/cmake/DeployMacros.cmake index fc8f0660..4ef3ebf6 100644 --- a/cmake/DeployMacros.cmake +++ b/cmake/DeployMacros.cmake @@ -1,112 +1,114 @@ -# Important! You should include this file -# in your top-level CMakeLists.txt -# -# -# -# -# set_version( [MAJOR ] [MINOR ] [REVISION ] [SUFFIX ] [BUILD ] [OUTPUT ]) -# -# Set target version, optionally creates file -# -# Create variable _VERSION with full version name -# -# If OUTPUT then generate header with -# version macros - _VERSION_ -# Also create macro _VERSION_NAME with full string version -# Attention: macro _VERSION is byte-packed integer version! -# -# -# -# -# set_lang( [ [...]]) -# -# Set target translations, e.g. "ru" "fr" -# -# -# -# -# import_version( ) -# -# Copy all version components and languages from -# -# -# -# -# set_deploy_property( [SHARED | STATIC] NAME [NAME [...]]) -# -# Set target deploy property, where NAME one of: -# * LABEL - application icon name -# * FULLNAME - package name in format "*.*.*" -# * COMPANY - company name -# * ICON - icon file path -# * INFO - additional info -# -# Specify SHARED or STATIC if your target is library -# You can setup several properties in one command -# -# -# -# -# deploy_target( [DEPLOY_DIR ] [DESTINATION ] -# [RESOURCES [ ...]] -# [PLUGINS [ ...]] -# [FILES [ ...]] -# [OPTIONS ...] [VERBOSE]) -# -# Create make target "deploy_", depends on target "deploy" -# On this target create release package, containing all dependencies: -# *.zip on Windows, *.deb on Linux and *.dmg an MacOS -# -# You should set version and deploy properties -# before call this macro, see -# "set_version()" and "set_deploy_property()" -# -# Example: -# deploy_target(my_app DESTINATION packages) -# -# -# DEPLOY_DIR - dir where you install -# * executable on Windows, Linux -# * .app directory with executable on MacOS -# -# DESTINATION - dir where macro place package -# RESOURCES, PLUGINS and FILES - list of directories and files, copied to: -# -# | Windows | Linux | MacOS -# ----------|---------|---------------------------|------------------- -# RESOURCES | root | /usr/share/COMPANY/target | Contents/Resources -# PLUGINS | root | /usr/lib/COMPANY/target | Contents/PlugIns -# FILES | root | /usr/bin | Contents/MacOS -# -# Relative paths are taken from DEPLOY_DIR -# Also check library dependencies from PLUGINS and FILES -# -# -# This macro using "deploy_tool" from PIP, -# so make sure it can be executed from shell -# OPTIONS allow you to pass custom flags to "deploy_tool" -# You can see flags by launch "deploy_tool" without arguments -# -# Using CMAKE_LDD, CMAKE_OTOOL or CMAKE_OBJDUMP variable, -# depends on target platform -# -# DEPLOY_ADD_LIBPATH variable used as additional -# library search path -# -# -# -# -# make_rc( ) -# -# Generate Windows *.rc file from deploy properties -# and return file path to -# On other platforms this variable set to empty -# -# You should set version and deploy properties -# before call this macro, see -# "set_version()" and "set_deploy_property()" -# -# +#[[ + +Important! You should include this file +in your top-level CMakeLists.txt + + + + +set_version( [MAJOR ] [MINOR ] [REVISION ] [SUFFIX ] [BUILD ] [OUTPUT ]) + +Set target version, optionally creates file + +Create variable _VERSION with full version name + +If OUTPUT then generate header with +version macros - _VERSION_ +Also create macro _VERSION_NAME with full string version +Attention: macro _VERSION is byte-packed integer version! + + + + +set_lang( [ [...] ]) + +Set target translations, e.g. "ru" "fr" + + + + +import_version( ) + +Copy all version components and languages from + + + + +set_deploy_property( [SHARED | STATIC] NAME [NAME [...] ]) + +Set target deploy property, where NAME one of: + * LABEL - application icon name + * FULLNAME - package name in format "*.*.*" + * COMPANY - company name + * ICON - icon file path + * INFO - additional info + +Specify SHARED or STATIC if your target is library +You can setup several properties in one command + + + + +deploy_target( [DEPLOY_DIR ] [DESTINATION ] + [RESOURCES [ ...] ] + [PLUGINS [ ...] ] + [FILES [ ...] ] + [OPTIONS ...] [VERBOSE]) + +Create make target "deploy_", depends on target "deploy" +On this target create release package, containing all dependencies: +*.zip on Windows, *.deb on Linux and *.dmg an MacOS + +You should set version and deploy properties +before call this macro, see +"set_version()" and "set_deploy_property()" + +Example: +deploy_target(my_app DESTINATION packages) + + +DEPLOY_DIR - dir where you install + * executable on Windows, Linux + * .app directory with executable on MacOS + +DESTINATION - dir where macro place package +RESOURCES, PLUGINS and FILES - list of directories and files, copied to: + + | Windows | Linux | MacOS +----------|---------|---------------------------|------------------- +RESOURCES | root | /usr/share/COMPANY/target | Contents/Resources +PLUGINS | root | /usr/lib/COMPANY/target | Contents/PlugIns +FILES | root | /usr/bin | Contents/MacOS + +Relative paths are taken from DEPLOY_DIR +Also check library dependencies from PLUGINS and FILES + + +This macro using "deploy_tool" from PIP, +so make sure it can be executed from shell +OPTIONS allow you to pass custom flags to "deploy_tool" +You can see flags by launch "deploy_tool" without arguments + +Using CMAKE_LDD, CMAKE_OTOOL or CMAKE_OBJDUMP variable, +depends on target platform + +DEPLOY_ADD_LIBPATH variable used as additional +library search path + + + + +make_rc( ) + +Generate Windows *.rc file from deploy properties +and return file path to +On other platforms this variable set to empty + +You should set version and deploy properties +before call this macro, see +"set_version()" and "set_deploy_property()" + +]] cmake_policy(SET CMP0011 NEW) # don`t affect includer policies @@ -117,6 +119,7 @@ if (POLICY CMP0053) cmake_policy(SET CMP0053 NEW) endif() set(__prop_names "LABEL;FULLNAME;COMPANY;ICON;INFO") +list(APPEND __prop_names "ANDROID_TARGET_SDK;ANDROID_STORE_FILE;ANDROID_STORE_PASSWORD;ANDROID_KEY_PASSWORD;ANDROID_KEY_ALIAS") set(__version_names "MAJOR;MINOR;REVISION;BUILD;SUFFIX") include(TargetArch) if (NOT MY_ARCH) @@ -409,6 +412,24 @@ macro(__make_copy _cmd _dirs _files _dest) endforeach() endif() endmacro() +#defaultConfig { +# resConfigs "ru" +#} +set(__gradle_sign +" signingConfigs { + release { + storeFile file(RELEASE_STORE_FILE) + storePassword RELEASE_STORE_PASSWORD + keyPassword RELEASE_KEY_PASSWORD + keyAlias RELEASE_KEY_ALIAS + } + } + + buildTypes { + release { + signingConfig signingConfigs.release + } + }") # Help macros end @@ -466,7 +487,7 @@ macro(deploy_target _T) #message("depend on ${_L}") get_target_property(_LT ${_L} TYPE) if ("x${_LT}" STREQUAL "xSHARED_LIBRARY") - set(_DEP_LIBPATH "${_DEP_LIBPATH};$") + set(_DEP_LIBPATH "${_DEP_LIBPATH}!$") set(_DEP_LIBS_CS "${_DEP_LIBS_CS};$/$") set(_DEP_LIBS "${_DEP_LIBS}" "$/$") endif() @@ -576,7 +597,7 @@ macro(deploy_target _T) # gather dir ${_CMD_} - COMMAND deploy_tool ${_VERB} ${_OPTIONS} -W "\"${CMAKE_OBJDUMP}\"" -P windows,minimal -S windows -q "\"${Qt5_ROOT}\"" -s "\"${CMAKE_PREFIX_PATH}/bin;${MINGW_BIN};${DEPLOY_ADD_LIBPATH}${_DEP_LIBPATH}\"" -o ${_AGD} -p ${_AGD} "\"${_AGD}${_T}.exe\"" ${_ADD_DEPS} + COMMAND deploy_tool ${_VERB} ${_OPTIONS} -W "\"${CMAKE_OBJDUMP}\"" -P windows,minimal -S windows -q "\"${Qt5_ROOT}\"" -s "\"${CMAKE_PREFIX_PATH}/bin!${MINGW_BIN}!${DEPLOY_ADD_LIBPATH}${_DEP_LIBPATH}\"" -o ${_AGD} -p ${_AGD} "\"${_AGD}${_T}.exe\"" ${_ADD_DEPS} # zip COMMAND cd "\"${_DEPLOY_DIR}\"" "&&" zip -q -r "\"${_DESTINATION}/${_TV}.zip\"" "\"${_TV}_win_${MY_ARCH}\"" COMMENT "Generating ${_TV}.zip" @@ -610,7 +631,7 @@ macro(deploy_target _T) ${_CMD_} #COMMAND cp ${_ICON_FN} ${_AGD}/Contents/Resources #COMMAND cp -r ${_DEPLOY_DIR}/lang ${_AGD}/Contents/Resources - COMMAND deploy_tool ${_VERB} ${_OPTIONS} -M "${CMAKE_OTOOL}" -P cocoa,minimal -S mac -q ${Qt5_ROOT} -s "\"${CMAKE_PREFIX_PATH}/lib;${DEPLOY_ADD_LIBPATH}${_DEP_LIBPATH}\"" -o ${_AGD}/Contents/Frameworks -p ${_AGD}/Contents/PlugIns ${_AGD}/Contents/MacOS/${_T} ${_ADD_DEPS} + COMMAND deploy_tool ${_VERB} ${_OPTIONS} -M "${CMAKE_OTOOL}" -P cocoa,minimal -S mac -q ${Qt5_ROOT} -s "\"${CMAKE_PREFIX_PATH}/lib!${DEPLOY_ADD_LIBPATH}${_DEP_LIBPATH}\"" -o ${_AGD}/Contents/Frameworks -p ${_AGD}/Contents/PlugIns ${_AGD}/Contents/MacOS/${_T} ${_ADD_DEPS} # prepare dmg dir COMMAND rm -rf ${_DMG} COMMAND mkdir ${_VERB} -p ${_DMG} @@ -622,33 +643,57 @@ macro(deploy_target _T) ) set(_has_deploy 1) elseif (DEFINED ANDROID_PLATFORM) + set(_res_files) + set(_res_files "${_res_files}\n ") + foreach (_f ${_RES_FILES}) + set(_res_files "${_res_files}\n ${_f}") + endforeach() + set(_res_files "${_res_files}\n ") + foreach (_d ${_RES_DIRS}) + file(GLOB_RECURSE _df "${_d}/*") + #message("FILES ${_d} = ${_df}") + get_filename_component(_dn "${_d}" NAME) + set(_res_files "${_res_files}\n ") + foreach (_f ${_df}) + get_filename_component(_fn "${_f}" NAME) + set(_res_files "${_res_files}\n ${_f}") + endforeach() + set(_res_files "${_res_files}\n ") + endforeach() + set(_res_qrc "${CMAKE_CURRENT_BINARY_DIR}/android_res.qrc") + file(WRITE "${_res_qrc}" "${_res_files}\n") + #__make_copy(_CMD_ _RES_DIRS _RES_FILES "${_AGD}/res") + #__make_copy(_CMD_ _FILE_DIRS _FILE_FILES "${_AGD}/Contents/MacOS") set(_AT ${_T}_lib) set(_ATA ${_AT}_${ANDROID_ABI}) get_target_property(_sources ${_T} SOURCES) get_target_property(_libs ${_T} LINK_LIBRARIES) get_target_property(_incs ${_T} INCLUDE_DIRECTORIES) - add_library(${_ATA} SHARED ${_sources}) + qt5_add_resources(_res_out "${_res_qrc}") + add_library(${_ATA} SHARED ${_sources} ${_res_out}) target_link_libraries(${_ATA} ${_libs}) target_include_directories(${_ATA} PRIVATE ${_incs}) set_target_properties(${_T} PROPERTIES EXCLUDE_FROM_ALL 1) #message("create new target ${_ATA} ${_sources} ${_libs}") set(_AGD "${_DEPLOY_DIR}/${_T}.android") - set(_file) __make_dir(_CMD_ "${_AGD}") - set(_dir "${CMAKE_BINARY_DIR}/android-build/libs") - __make_copy(_CMD_ _dir _file "${_AGD}") - set(_dir "${CMAKE_CURRENT_SOURCE_DIR}/android/res") - __make_copy(_CMD_ _dir _file "${_AGD}") - set(_dir "${CMAKE_CURRENT_SOURCE_DIR}/android/src") + set(_file) + set(_dir "${CMAKE_BINARY_DIR}/android-build/libs" "${CMAKE_CURRENT_SOURCE_DIR}/android/res" "${CMAKE_CURRENT_SOURCE_DIR}/android/src") __make_copy(_CMD_ _dir _file "${_AGD}") set(_dir) set(_file "${Qt5_ROOT}/src/android/templates/res/values/libs.xml") __make_copy(_CMD_ _dir _file "${_AGD}/res/values") - __make_copy(_CMD_ _RES_DIRS _RES_FILES "${_AGD}/res") + set(_dir "${Qt5_ROOT}/src/3rdparty/gradle/gradle") + set(_file "${Qt5_ROOT}/src/3rdparty/gradle/gradlew" + "${Qt5_ROOT}/src/3rdparty/gradle/gradlew.bat") + __make_copy(_CMD_ _dir _file "${_AGD}") #__make_copy(_CMD_ _PLUG_DIRS _PLUG_FILES "${_AGD}/") - #__make_copy(_CMD_ _FILE_DIRS _FILE_FILES "${_AGD}/Contents/MacOS") - message("bindir = ${CMAKE_CURRENT_SOURCE_DIR}") + #message("bindir = ${CMAKE_CURRENT_SOURCE_DIR}") #get_target_property(_LL ${_T} ) + set(SDK_ROOT "$ENV{ANDROID_SDK_ROOT}") + if("x${SDK_ROOT}" STREQUAL "x") + set(SDK_ROOT "$ENV{ANDROID_HOME}") + endif() set(__archs "armeabi-v7a" "arm64-v8a" "x86" "x86_64") set(QT_ANDROID_ARCHITECTURES) find_library(_lib_ c++_shared) @@ -672,7 +717,7 @@ macro(deploy_target _T) string(REPLACE "${ANDROID_SYSROOT_${ANDROID_ABI}}" "${ANDROID_SYSROOT_${_a}}" _lib_${_a} "${_lib_}") #message("search = ${_a_prefix}/lib") __make_copy(_CMD_ _empty _lib_${_a} "${_AGD}/libs/${_a}") - set(_CMD_ ${_CMD_} COMMAND deploy_tool ${_VERB} ${_OPTIONS} -W "\"${CMAKE_OBJDUMP}\"" -s "\"${_a_prefix}/lib\"" -o "\"${_AGD}/libs/${_a}\"" --ignore "\"c:m:dl\"" "\"${_AGD}/libs/${_a}/lib${_AT}_${_a}.so\"" ${_ADD_DEPS}) + set(_CMD_ ${_CMD_} COMMAND deploy_tool ${_VERB} ${_OPTIONS} -W "\"${CMAKE_OBJDUMP}\"" -s "${_a_prefix}/lib!${Qt5_ROOT}/lib" -o "\"${_AGD}/libs/${_a}\"" --ignore "\"c!m!dl\"" "\"${_AGD}/libs/${_a}/lib${_AT}_${_a}.so\"" ${_ADD_DEPS}) #message("c++_${_a} -> ${_lib_${_a}}") endif() endforeach() @@ -683,11 +728,38 @@ macro(deploy_target _T) set(ANDROID_VERSION "${${_T}_VERSION}") set(ANDROID_BUILD "${${_T}_VERSION_BUILD}") set(ANDROID_PACKAGE "${${_T}_FULLNAME}") + set(ANDROID_TARGET_SDK "${${_T}_ANDROID_TARGET_SDK}") + set(ANDROID_STORE_FILE "${${_T}_ANDROID_STORE_FILE}") + set(ANDROID_STORE_PASSWORD "${${_T}_ANDROID_STORE_PASSWORD}") + set(ANDROID_KEY_PASSWORD "${${_T}_ANDROID_KEY_PASSWORD}") + set(ANDROID_KEY_ALIAS "${${_T}_ANDROID_KEY_ALIAS}") + if (NOT IS_ABSOLUTE "${ANDROID_STORE_FILE}") + set(ANDROID_STORE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/android/${ANDROID_STORE_FILE}") + endif() set(QT_DIR ${Qt5_ROOT}) - set(_out_json "${CMAKE_CURRENT_BINARY_DIR}/${_T}_android_deployment_settings.json") configure_file("${CMAKE_BINARY_DIR}/android_deployment_settings.json.in" "${_out_json}") configure_file("${CMAKE_CURRENT_SOURCE_DIR}/android/AndroidManifest.xml.in" "${_AGD}/AndroidManifest.xml") + configure_file("${CMAKE_ROOT}/Modules/gradle.properties.in" "${_AGD}/gradle.properties") + set(_depstr) + foreach (_d ${ANDROID_GRADLE_DEPENDENCIES}) + set(_depstr "${_depstr}\n ${_d}") + endforeach() + file(READ "${Qt5_ROOT}/src/android/templates/build.gradle" _file) + string(REPLACE "\ndependencies {" "\ndependencies {${_depstr}" _file "${_file}") + string(REPLACE "\nandroid {" "\nandroid {\n${__gradle_sign}" _file "${_file}") + string(REPLACE "['resources']" "['res']" _file "${_file}") + file(WRITE "${_AGD}/build.gradle" "${_file}") + set(_out_json "${CMAKE_CURRENT_BINARY_DIR}/${_T}_android_deployment_settings.json") + set(_CMD_ ${_CMD_} COMMAND "${SDK_ROOT}/tools/android" update project --path "\"${_AGD}\"" --target android-${ANDROID_TARGET_SDK} --name QtApp) set(_CMD_ ${_CMD_} COMMAND "${Qt5_BIN}/androiddeployqt" --aux-mode --android-platform ${ANDROID_PLATFORM} --output "\"${_AGD}\"" --input "\"${_out_json}\"") + set(_CMD_ ${_CMD_} COMMAND "${_AGD}/gradlew" --no-daemon -p "\"${_AGD}\"" assembleDebug) + set(_CMD_ ${_CMD_} COMMAND "${_AGD}/gradlew" --no-daemon -p "\"${_AGD}\"" bundleRelease) + set(_dir) + set(_file "${_AGD}/build/outputs/apk/debug/${_T}.android-debug.apk") + if (ANDROID_STORE_FILE) + list(APPEND _file "${_AGD}/build/outputs/bundle/release/${_T}.android-release.aab") + endif() + __make_copy(_CMD_ _dir _file "${_DESTINATION}") add_custom_target(deploy_${_T} # gather .app dir ${_CMD_} diff --git a/cmake/FindPIP.cmake b/cmake/FindPIP.cmake index bd8ee9bf..3a78064b 100644 --- a/cmake/FindPIP.cmake +++ b/cmake/FindPIP.cmake @@ -1,3 +1,20 @@ +#[[ + +Also create imported targets: + * PIP - main library + * PIP::USB + * PIP::Crypt + * PIP::FFTW + * PIP::Compress + * PIP::IOUtils + * PIP::Concurrent + * PIP::Cloud + +These targets include directories and depends on +main library + +]] + cmake_policy(SET CMP0011 NEW) # don`t affect includer policies #set(_PIP_MODULES pip pip_usb pip_crypt pip_fftw) if(WIN32) @@ -42,15 +59,19 @@ else() list(APPEND _PIP_BINDIR "${CMAKE_PREFIX_PATH}/bin") endif() list(APPEND _PIP_BINDIR "${PIP_DIR}/bin") +set(_pip_suffix "") +#if(DEFINED ANDROID_PLATFORM) +# set(_pip_suffix "_${ANDROID_ABI}") +#endif() -find_library(PIP_LIBRARY pip HINTS ${_PIP_LIBDIR}) -find_library(PIP_USB_LIBRARY pip_usb HINTS ${_PIP_LIBDIR}) -find_library(PIP_CRYPT_LIBRARY pip_crypt HINTS ${_PIP_LIBDIR}) -find_library(PIP_FFTW_LIBRARY pip_fftw HINTS ${_PIP_LIBDIR}) -find_library(PIP_COMPRESS_LIBRARY pip_compress HINTS ${_PIP_LIBDIR}) -find_library(PIP_IO_UTILS_LIBRARY pip_io_utils HINTS ${_PIP_LIBDIR}) -find_library(PIP_CONCURRENT_LIBRARY pip_concurrent HINTS ${_PIP_LIBDIR}) -find_library(PIP_CLOUD_LIBRARY pip_cloud HINTS ${_PIP_LIBDIR}) +find_library(PIP_LIBRARY pip${_pip_suffix} HINTS ${_PIP_LIBDIR}) +find_library(PIP_USB_LIBRARY pip_usb${_pip_suffix} HINTS ${_PIP_LIBDIR}) +find_library(PIP_CRYPT_LIBRARY pip_crypt${_pip_suffix} HINTS ${_PIP_LIBDIR}) +find_library(PIP_FFTW_LIBRARY pip_fftw${_pip_suffix} HINTS ${_PIP_LIBDIR}) +find_library(PIP_COMPRESS_LIBRARY pip_compress${_pip_suffix} HINTS ${_PIP_LIBDIR}) +find_library(PIP_IO_UTILS_LIBRARY pip_io_utils${_pip_suffix} HINTS ${_PIP_LIBDIR}) +find_library(PIP_CONCURRENT_LIBRARY pip_concurrent${_pip_suffix} HINTS ${_PIP_LIBDIR}) +find_library(PIP_CLOUD_LIBRARY pip_cloud HINTS${_pip_suffix} ${_PIP_LIBDIR}) find_file(PIP_H_INCLUDE "pip.h" HINTS ${_PIP_INCDIR} $ENV{SMSDK_DIR}/include/pip) #if (DEFINED ANDROID_PLATFORM) # set(PIP_INCLUDES ${ANDROID_SYSTEM_LIBRARY_PATH}/usr/include/pip) @@ -63,13 +84,15 @@ if (NOT PIP_LIBRARY) message(FATAL_ERROR "Can`t find PIP library!") endif() set(_PIP_LIBRARY_PATH_ "${PIP_LIBRARY}") +set(_PIP_ADD_LIBS_ "") if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") find_library(DL_LIBRARY dl) list(APPEND PIP_LIBRARY ${DL_LIBRARY}) if (NOT DEFINED ANDROID_PLATFORM) find_library(PTHREAD_LIBRARY pthread) find_library(UTIL_LIBRARY util) - list(APPEND PIP_LIBRARY ${PTHREAD_LIBRARY} ${UTIL_LIBRARY}) + set(_PIP_ADD_LIBS_ ${PTHREAD_LIBRARY} ${UTIL_LIBRARY}) + list(APPEND PIP_LIBRARY ${_PIP_ADD_LIBS_}) endif() endif() @@ -95,5 +118,31 @@ if(PIP_FIND_VERSION VERSION_GREATER PIP_VERSION) message(FATAL_ERROR "PIP version ${PIP_VERSION} is available, but ${PIP_FIND_VERSION} requested!") endif() +set(__modules "USB;Crypt;FFTW;Compress;IOUtils;Concurrent;Cloud") +set(__module_USB "${PIP_USB_LIBRARY}" ) +set(__module_Crypt "${PIP_CRYPT_LIBRARY}" ) +set(__module_FFTW "${PIP_FFTW_LIBRARY}" ) +set(__module_Compress "${PIP_COMPRESS_LIBRARY}" ) +set(__module_IOUtils "${PIP_IO_UTILS_LIBRARY}" ) +set(__module_Concurrent "${PIP_CONCURRENT_LIBRARY}") +set(__module_Cloud "${PIP_CLOUD_LIBRARY}" ) +if((NOT TARGET PIP) AND PIP_LIBRARY) + add_library(PIP UNKNOWN IMPORTED) + set_target_properties(PIP PROPERTIES + IMPORTED_LOCATION "${_PIP_LIBRARY_PATH_}" + INTERFACE_INCLUDE_DIRECTORIES "${PIP_INCLUDES}" + INTERFACE_LINK_LIBRARIES "${_PIP_ADD_LIBS_}") +endif() +foreach (_m ${__modules}) + if((NOT TARGET PIP::${_m}) AND __module_${_m}) + add_library(PIP::${_m} UNKNOWN IMPORTED) + set_target_properties(PIP::${_m} PROPERTIES + IMPORTED_LOCATION "${__module_${_m}}" + INTERFACE_LINK_LIBRARIES "PIP") + endif() +endforeach() +set_target_properties(PIP::IOUtils PROPERTIES INTERFACE_LINK_LIBRARIES "PIP::Crypt") +set_target_properties(PIP::Cloud PROPERTIES INTERFACE_LINK_LIBRARIES "PIP::IOUtils") + include(PIPMacros) diff --git a/cmake/PIPMacros.cmake b/cmake/PIPMacros.cmake index 18e75449..5cc6c69a 100644 --- a/cmake/PIPMacros.cmake +++ b/cmake/PIPMacros.cmake @@ -1,20 +1,22 @@ -# pip_code_model( file0 [file1 ...] [OPTIONS opt0 [opt1 ...]] [ABSOLUTE]) -# -# Generate code model files for source files file0 [file1 ...] -# -# Options you can see by exec "pip_cmg -h" -# If not ABSOLUTE source files will be prepended by CMAKE_CURRENT_SOURCE_DIR -# You should add ${} to your target -# -# -# -# -# pip_resources( file) -# -# Generate C++ files for resource file -# You should add ${} to your target -# -# +#[[ + + pip_code_model( file0 [file1 ...] [OPTIONS opt0 [opt1 ...] ] [ABSOLUTE]) + + Generate code model files for source files file0 [file1 ...] + + Options you can see by exec "pip_cmg -h" + If not ABSOLUTE source files will be prepended by CMAKE_CURRENT_SOURCE_DIR + You should add ${} to your target + + + + + pip_resources( file) + + Generate C++ files for resource file + You should add ${} to your target + +]] macro(PIP_EXTRACT_OPTIONS _pip_files _pip_options _abs) diff --git a/cmake/gradle.properties.in b/cmake/gradle.properties.in new file mode 100644 index 00000000..65e0429f --- /dev/null +++ b/cmake/gradle.properties.in @@ -0,0 +1,8 @@ +androidBuildToolsVersion= +androidCompileSdkVersion=@ANDROID_TARGET_SDK@ +buildDir=build +qt5AndroidDir=@Qt5_ROOT@/src/android/java +RELEASE_STORE_FILE=@ANDROID_STORE_FILE@ +RELEASE_STORE_PASSWORD=@ANDROID_STORE_PASSWORD@ +RELEASE_KEY_PASSWORD=@ANDROID_KEY_PASSWORD@ +RELEASE_KEY_ALIAS=@ANDROID_KEY_ALIAS@ diff --git a/utils/deploy_tool/main.cpp b/utils/deploy_tool/main.cpp index 5e1def98..b24f3e37 100644 --- a/utils/deploy_tool/main.cpp +++ b/utils/deploy_tool/main.cpp @@ -36,8 +36,8 @@ void usage() { piCout << "If some Qt dependency found, copy corresponding Qt plugins."; piCout << "Styles and platforms selected by -S and -P flags,"; piCout << "any other plugins described by --qt-plugins flag in next format:"; - piCout << "\"[*=:]=,:=,\", e.g."; - piCout << "\"sqldrivers=lite,mysql:geoservices=:position=nmea\"."; + piCout << "\"[*=!]=,!=,\", e.g."; + piCout << "\"sqldrivers=lite,mysql!geoservices=!position=nmea\"."; piCout << "If no regexp specified for plugins, nothing will be copied."; piCout << "Default regexp set by \"*=\"."; piCout << "\"*=\" disable optional plugins."; @@ -54,8 +54,8 @@ void usage() { piCout << ""; piCout << Bold << "Processing control"; piCout << "-f, --fake " << Green << "- don`t copy, only print"; - piCout << "-s " << Green << "- set search pathes for system libraries, may be separated by \";\", default \"/usr/lib\""; - piCout << "--ignore " << Green << "- ignore libraries names, may be separated by \":\", default \"\""; + piCout << "-s " << Green << "- set search pathes for system libraries, may be separated by \"!\", default \"/usr/lib\""; + piCout << "--ignore " << Green << "- ignore libraries names, may be separated by \"!\", default \"\""; piCout << "-l " << Green << "- \"ldd\" path, default \"/usr/bin/ldd\""; piCout << "-L " << Green << "- \"readelf\" path, overrides \"ldd\""; piCout << "-W " << Green << "- \"objdump\" path, overrides \"ldd\""; @@ -79,7 +79,7 @@ void usage() { piCout << ""; piCout << Bold << "Input control"; piCout << " ... " << Green << "- executable to process"; - piCout << "-a " << Green << "- additional libs, separated by \";\". Libraries will be searched in "; + piCout << "-a " << Green << "- additional libs, separated by \"!\". Libraries will be searched in "; } struct QtDep { @@ -391,9 +391,9 @@ int main(int argc, char * argv[]) { piDebug = cli.hasArgument("verbose"); is_deps = cli.hasArgument("dependencies"); out_dir = cli.argumentValue("output"); - lib_dirs = cli.argumentValue("search_path").split(";"); - add_libs = cli.argumentValue("add_libs").split(";"); - ignore_libs = cli.argumentValue("ignore").split(":"); + lib_dirs = cli.argumentValue("search_path").split("!"); + add_libs = cli.argumentValue("add_libs").split("!"); + ignore_libs = cli.argumentValue("ignore").split("!"); qt_dir = cli.argumentValue("qtdir"); ldd = cli.argumentValue("ldd"); readelf = cli.argumentValue("Lreadelf"); @@ -446,7 +446,7 @@ int main(int argc, char * argv[]) { platforms = qplatforms.split(","); styles = cli.argumentValue("Styles").split(","); if (styles.isEmpty()) styles << ""; - PIStringList qpd = cli.argumentValue("qt-plugins").toLowerCase().split(":"); + PIStringList qpd = cli.argumentValue("qt-plugins").toLowerCase().split("!"); piForeachC (PIString & qp, qpd) { int _i = qp.indexOf("="); if (_i < 0) continue;