git-svn-id: svn://db.shs.com.ru/pip@987 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -45,21 +45,36 @@
|
|||||||
# [PLUGINS <dir|file> [<dir|file> ...]]
|
# [PLUGINS <dir|file> [<dir|file> ...]]
|
||||||
# [FILES <dir|file> [<dir|file> ...]])
|
# [FILES <dir|file> [<dir|file> ...]])
|
||||||
#
|
#
|
||||||
|
# Create make target "deploy_<target>", 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
|
# DEPLOY_DIR - dir where you install
|
||||||
# * executable on Windows, Linux
|
# * executable on Windows, Linux
|
||||||
# * <T>.app directory with executable on MacOS
|
# * <T>.app directory with executable on MacOS
|
||||||
#
|
#
|
||||||
# DESTINATION - dir where macro place package
|
# DESTINATION - dir where macro place package
|
||||||
|
# RESOURCES, PLUGINS and FILES - list of directories and files, copied to:
|
||||||
#
|
#
|
||||||
# Example:
|
# | Windows | Linux | MacOS
|
||||||
# deploy_target(my_app DESTINATION packages)
|
# ----------|---------|--------------------|-------------------
|
||||||
|
# RESOURCES | root | /usr/share/COMPANY | Contents/Resources
|
||||||
|
# PLUGINS | root | /usr/lib/COMPANY | Contents/PlugIns
|
||||||
|
# FILES | root | /usr/bin | Contents/MacOS
|
||||||
#
|
#
|
||||||
# Create make target "deploy_<target>", depends on target "deploy"
|
# Also check library dependencies from PLUGINS and FILES
|
||||||
#
|
#
|
||||||
# This macro use "deploy_tool" from sdk,
|
#
|
||||||
# make sure it can be executed from shell
|
# This macro using "deploy_tool" from PIP,
|
||||||
# You should set deploy properties before
|
# so make sure it can be executed from shell
|
||||||
# call this macro, see "set_deploy_property()"
|
|
||||||
#
|
#
|
||||||
# use "CMAKE_OTOOL" or "CMAKE_OBJDUMP" variable,
|
# use "CMAKE_OTOOL" or "CMAKE_OBJDUMP" variable,
|
||||||
# depends on target platform
|
# depends on target platform
|
||||||
@@ -356,6 +371,7 @@ macro(deploy_target _T)
|
|||||||
set(_DEP_LIBPATH)
|
set(_DEP_LIBPATH)
|
||||||
set(_DEP_LIBS_CS)
|
set(_DEP_LIBS_CS)
|
||||||
set(_DEP_LIBS)
|
set(_DEP_LIBS)
|
||||||
|
set(_ADD_DEPS ${_PLUG_DIRS} ${_PLUG_FILES} ${_FILE_DIRS} ${_FILE_FILES})
|
||||||
get_target_property(_LL ${_T} LINK_LIBRARIES)
|
get_target_property(_LL ${_T} LINK_LIBRARIES)
|
||||||
foreach (_L ${_LL})
|
foreach (_L ${_LL})
|
||||||
if (TARGET ${_L})
|
if (TARGET ${_L})
|
||||||
@@ -436,7 +452,7 @@ macro(deploy_target _T)
|
|||||||
COMMAND echo "Version: ${_DEBVERSION}" ${_C_echo}
|
COMMAND echo "Version: ${_DEBVERSION}" ${_C_echo}
|
||||||
COMMAND echo "Architecture: ${_DEB_ARCH}" ${_C_echo}
|
COMMAND echo "Architecture: ${_DEB_ARCH}" ${_C_echo}
|
||||||
COMMAND echo "Maintainer: ${${_T}_COMPANY} <>" ${_C_echo}
|
COMMAND echo "Maintainer: ${${_T}_COMPANY} <>" ${_C_echo}
|
||||||
COMMAND deploy_tool --prefix "Depends: " --dependencies -l ${CMAKE_LDD} -a "${_DEP_LIBS_CS}" -o "${_AGD}/usr/lib" ${_DEPLOY_DIR}/${_T} ${_PLUG_DIRS} ${_C_echo}
|
COMMAND deploy_tool --prefix "Depends: " --dependencies -l ${CMAKE_LDD} -a "${_DEP_LIBS_CS}" -o "${_AGD}/usr/lib" ${_DEPLOY_DIR}/${_T} ${_ADD_DEPS} ${_C_echo}
|
||||||
COMMAND echo "Conflicts:" ${_C_echo}
|
COMMAND echo "Conflicts:" ${_C_echo}
|
||||||
COMMAND echo "Replaces:" ${_C_echo}
|
COMMAND echo "Replaces:" ${_C_echo}
|
||||||
COMMAND echo "Section: misc" ${_C_echo}
|
COMMAND echo "Section: misc" ${_C_echo}
|
||||||
@@ -537,7 +553,7 @@ macro(deploy_target _T)
|
|||||||
# gather dir
|
# gather dir
|
||||||
${_CMD_COPY}
|
${_CMD_COPY}
|
||||||
|
|
||||||
COMMAND deploy_tool -W "\"${CMAKE_OBJDUMP}\"" -P windows -S windows -q "\"${Qt5_ROOT}\"" -s "\"${CMAKE_PREFIX_PATH}/bin;${MINGW_BIN};${DEPLOY_ADD_LIBPATH}${_DEP_LIBPATH}\"" -o ${_AGD} -p ${_AGD} "\"${_AGD}${_T}.exe\"" ${_PLUG_DIRS}
|
COMMAND deploy_tool -W "\"${CMAKE_OBJDUMP}\"" -P windows -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
|
# zip
|
||||||
COMMAND cd "\"${_DEPLOY_DIR}\"" "&&" zip -q -r "\"${_DESTINATION}/${_TV}.zip\"" "\"${_TV}_win_${MY_ARCH}\""
|
COMMAND cd "\"${_DEPLOY_DIR}\"" "&&" zip -q -r "\"${_DESTINATION}/${_TV}.zip\"" "\"${_TV}_win_${MY_ARCH}\""
|
||||||
COMMENT "Generating ${_TV}.zip"
|
COMMENT "Generating ${_TV}.zip"
|
||||||
@@ -582,7 +598,7 @@ macro(deploy_target _T)
|
|||||||
${_CMD_COPY}
|
${_CMD_COPY}
|
||||||
#COMMAND cp ${_ICON_FN} ${_AGD}/Contents/Resources
|
#COMMAND cp ${_ICON_FN} ${_AGD}/Contents/Resources
|
||||||
#COMMAND cp -r ${_DEPLOY_DIR}/lang ${_AGD}/Contents/Resources
|
#COMMAND cp -r ${_DEPLOY_DIR}/lang ${_AGD}/Contents/Resources
|
||||||
COMMAND deploy_tool -M "${CMAKE_OTOOL}" -P cocoa -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} ${_PLUG_DIRS}
|
COMMAND deploy_tool -M "${CMAKE_OTOOL}" -P cocoa -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
|
# prepare dmg dir
|
||||||
COMMAND rm -rf ${_DMG}
|
COMMAND rm -rf ${_DMG}
|
||||||
COMMAND mkdir -p ${_DMG}
|
COMMAND mkdir -p ${_DMG}
|
||||||
|
|||||||
Reference in New Issue
Block a user