Compare commits

..

3 Commits

Author SHA1 Message Date
28e7ef2205 Merge branch 'master' of https://git.shstk.ru/SHS/cmake 2026-01-29 12:46:23 +03:00
0c0ccb1515 add PACKAGE_SUFFIX to deploy_target 2026-01-29 12:45:58 +03:00
2982f37522 PIP_FREERTOS -> PIP_MICRO 2025-10-18 08:17:08 +03:00
2 changed files with 10 additions and 4 deletions

View File

@@ -86,6 +86,7 @@ deploy_target(<target> [DEPLOY_DIR <dir>]
[PLUGINS <dir|file> [<dir|file> ...] ] [PLUGINS <dir|file> [<dir|file> ...] ]
[FILES <dir|file> [<dir|file> ...] ] [FILES <dir|file> [<dir|file> ...] ]
[LIBS <dir|file> [<dir|file> ...] ] [LIBS <dir|file> [<dir|file> ...] ]
[PACKAGE_SUFFIX <suffix>]
[OPTIONS <flag> ...] [OPTIONS <flag> ...]
[VERBOSE] [VERBOSE]
[DMG_NO_ZIP] [DMG_NO_ZIP]
@@ -137,6 +138,7 @@ Examples:
* "$<TARGET_FILE_NAME:myexe>" - right, relative item and TARGET_FILE_NAME is only filename * "$<TARGET_FILE_NAME:myexe>" - right, relative item and TARGET_FILE_NAME is only filename
* "/$<TARGET_FILE_NAME:myexe>" - wrong, absolute item with only filename * "/$<TARGET_FILE_NAME:myexe>" - wrong, absolute item with only filename
PACKAGE_SUFFIX is additional text for package, after base name and before version
This macro using "deploy_tool" from PIP, This macro using "deploy_tool" from PIP,
so make sure it can be executed from shell so make sure it can be executed from shell
@@ -169,7 +171,7 @@ if (POLICY CMP0053)
cmake_policy(SET CMP0053 NEW) cmake_policy(SET CMP0053 NEW)
endif() endif()
if (NOT _dep_exists AND NOT PIP_FREERTOS) if (NOT _dep_exists AND NOT PIP_MICRO)
set(_dep_exists 1) set(_dep_exists 1)
add_custom_target(deploy COMMENT "Deploy") add_custom_target(deploy COMMENT "Deploy")
endif() endif()
@@ -428,6 +430,7 @@ macro(deploy_target _T)
set(_FILE_FILES) set(_FILE_FILES)
set(_LIBS_DIRS) set(_LIBS_DIRS)
set(_LIBS_FILES) set(_LIBS_FILES)
set(_SUFFIX)
set(_VERB) set(_VERB)
set(_WVERB 1> NUL) set(_WVERB 1> NUL)
set(_DEBUG_SUFFIX) set(_DEBUG_SUFFIX)
@@ -441,7 +444,7 @@ macro(deploy_target _T)
set(_DEB_SERVICE 0) set(_DEB_SERVICE 0)
set(_MANIFEST 0) set(_MANIFEST 0)
set(_cur_arg) set(_cur_arg)
set(__args "DESTINATION;DEPLOY_DIR;RESOURCES;PLUGINS;FILES;LIBS;OPTIONS;VERBOSE;DMG_NO_ZIP;DEB_USR_DIR;DEB_ADD_SERVICE;ADD_MANIFEST") set(__args "PACKAGE_SUFFIX;DESTINATION;DEPLOY_DIR;RESOURCES;PLUGINS;FILES;LIBS;OPTIONS;VERBOSE;DMG_NO_ZIP;DEB_USR_DIR;DEB_ADD_SERVICE;ADD_MANIFEST")
foreach(_i ${ARGN}) foreach(_i ${ARGN})
if (_i IN_LIST __args) if (_i IN_LIST __args)
set(_cur_arg "${_i}") set(_cur_arg "${_i}")
@@ -457,6 +460,9 @@ macro(deploy_target _T)
elseif("x${_cur_arg}" STREQUAL "xADD_MANIFEST") elseif("x${_cur_arg}" STREQUAL "xADD_MANIFEST")
set(_MANIFEST 1) set(_MANIFEST 1)
endif() endif()
elseif ("x${_cur_arg}" STREQUAL "xPACKAGE_SUFFIX")
set(_cur_arg)
set(_SUFFIX "${_i}")
elseif ("x${_cur_arg}" STREQUAL "xDESTINATION") elseif ("x${_cur_arg}" STREQUAL "xDESTINATION")
set(_cur_arg) set(_cur_arg)
set(_DESTINATION "${_i}/") set(_DESTINATION "${_i}/")
@@ -478,7 +484,7 @@ macro(deploy_target _T)
endforeach() endforeach()
get_filename_component(_ICON_NAME "${${_T}_ICON}" NAME) get_filename_component(_ICON_NAME "${${_T}_ICON}" NAME)
get_filename_component(_ICON_FN "${${_T}_ICON}" ABSOLUTE BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") get_filename_component(_ICON_FN "${${_T}_ICON}" ABSOLUTE BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(_TV "${_T}_${${_T}_VERSION}") set(_TV "${_T}${_SUFFIX}_${${_T}_VERSION}")
set(_DEP_LIBPATH) set(_DEP_LIBPATH)
set(_DEP_LIBS_CS) set(_DEP_LIBS_CS)
set(_DEP_LIBS) set(_DEP_LIBS)

View File

@@ -59,7 +59,7 @@ macro(shstk_begin_project name)
endif() endif()
shstk_define_option(LOCAL "Local install" OFF) shstk_define_option(LOCAL "Local install" OFF)
if (DEFINED ENV{QNX_HOST} OR PIP_FREERTOS) if (DEFINED ENV{QNX_HOST} OR PIP_MICRO)
set(STATIC_LIB_DEFAULT ON) set(STATIC_LIB_DEFAULT ON)
else() else()
set(STATIC_LIB_DEFAULT OFF) set(STATIC_LIB_DEFAULT OFF)