mirror of
https://github.com/QuasarApp/CMake.git
synced 2025-04-26 01:44:30 +00:00
added custom release macros
This commit is contained in:
parent
06982362ec
commit
b4f0a17911
@ -78,6 +78,10 @@ For get more information about this function see oficial [documentation](https:/
|
||||
---
|
||||
**initRelease** - Сreate the general release target for all subtargets addRelease. This method need to call before invoice all addRelease methods.
|
||||
|
||||
**addReleaseCustom** (name pyFile) - This function prepare to run pyFile and add dependencies for release target.
|
||||
- name - This is prefix of added subtarget (any word).
|
||||
- pyFile This is python script for release project.
|
||||
|
||||
**addReleaseSnap** (name) - Сreate subtargets for publish snap deployed snap package.
|
||||
- name - This is prefix of added subtarget (any word).
|
||||
|
||||
|
@ -73,6 +73,10 @@
|
||||
# *** Release ***
|
||||
# initRelease() // Create the general release target for all subtargets addRelease. This method need to call before invoice all addRelease methods.
|
||||
#
|
||||
# addReleaseCustom(name pyFile) // This function prepare to run pyFile and add dependencies for release target.
|
||||
# - name - This is prefix of added subtarget (any word).
|
||||
# - pyFile This is python script for release project.
|
||||
#
|
||||
# addReleaseSnap(name) // Create subtargets for publish snap deployed snap package.
|
||||
# - name - This is prefix of added subtarget (any word).
|
||||
#
|
||||
@ -504,6 +508,26 @@ function(initRelease)
|
||||
|
||||
endfunction()
|
||||
|
||||
function(addReleaseCustom name pyFile)
|
||||
|
||||
if(TARGET pyRelease${name})
|
||||
message("the pyRelease${name} target already created!")
|
||||
return()
|
||||
|
||||
endif(TARGET pyRelease${name})
|
||||
|
||||
ADD_CUSTOM_TARGET(
|
||||
pyRelease${name}
|
||||
COMMAND python pyFile
|
||||
COMMENT "pyRelease${name} release: run python ${pyFile}"
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
|
||||
)
|
||||
|
||||
add_dependencies(release pyRelease${name})
|
||||
|
||||
endfunction()
|
||||
|
||||
function(addReleaseSnap name)
|
||||
|
||||
if(TARGET snapRelease${name})
|
||||
|
Loading…
x
Reference in New Issue
Block a user