2022-08-08 04:20:47 +08:00
|
|
|
cmake_minimum_required(VERSION 3.16)
|
|
|
|
|
2022-09-03 04:59:41 +08:00
|
|
|
add_custom_target(JKQTMathText_GenerateDocImages
|
|
|
|
COMMENT "Building JKQTMathText Documentation Images ..."
|
|
|
|
)
|
|
|
|
|
|
|
|
add_custom_target(JKQTPlotter_GenerateDocScreenshots
|
|
|
|
COMMENT "Building JKQTPlotter Documentation Screenshots ..."
|
|
|
|
)
|
|
|
|
|
|
|
|
add_custom_target(JKQTPlotter_GenerateDocImages
|
|
|
|
COMMENT "Building JKQTPlotter Documentation Images ..."
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
add_custom_target(JKQTP_GenerateAllDocImages
|
|
|
|
DEPENDS JKQTPlotter_GenerateDocImages JKQTPlotter_GenerateDocScreenshots JKQTMathText_GenerateDocImages
|
|
|
|
)
|
2022-08-08 04:20:47 +08:00
|
|
|
|
|
|
|
if(JKQtPlotter_BUILD_TOOLS)
|
|
|
|
|
|
|
|
# custom target that generates the images for the JKQTMathText documentation
|
2023-07-01 21:57:57 +08:00
|
|
|
set(JKQTMathText_GenerateDocImages_DefaultOptions --resolution=96 --fontsize=16 --fontmathroman=XITS --background=white --sizeincrease=5)
|
2022-08-08 04:20:47 +08:00
|
|
|
set(JKQTMathText_GenerateDocImages_StdInputFiles
|
|
|
|
jkqtmathtext_docimages_accents.jkmt
|
|
|
|
jkqtmathtext_docimages_boxes.jkmt
|
|
|
|
jkqtmathtext_docimages_braces.jkmt
|
|
|
|
jkqtmathtext_docimages_formating.jkmt
|
|
|
|
jkqtmathtext_docimages_frac.jkmt
|
|
|
|
jkqtmathtext_docimages_math.jkmt
|
|
|
|
jkqtmathtext_docimages_matrix.jkmt
|
|
|
|
jkqtmathtext_docimages_misc.jkmt
|
|
|
|
jkqtmathtext_docimages_specialfonts.jkmt
|
|
|
|
jkqtmathtext_docimages_symbolsandencoding.jkmt
|
2022-08-08 16:39:15 +08:00
|
|
|
jkqtmathtext_docimages_spaces.jkmt
|
2022-08-08 04:20:47 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
set(JKQTMathText_GenerateDocImages_COMMAND $<TARGET_FILE:jkqtmathtext_render> ${JKQTMathText_GenerateDocImages_DefaultOptions})
|
|
|
|
set(JKQTMathText_GenerateDocImages_OutputDir "${CMAKE_CURRENT_LIST_DIR}/images/jkqtmathtext/")
|
|
|
|
|
|
|
|
foreach(file ${JKQTMathText_GenerateDocImages_StdInputFiles})
|
|
|
|
string(REGEX MATCH ".*_([^_\.]+)\.[A-Za-z]+" dummy ${file})
|
|
|
|
set(loc_name ${CMAKE_MATCH_1})
|
|
|
|
string(TOUPPER ${loc_name} loc_name_upper ${file})
|
|
|
|
set(loc_target_name "JKQTMathText_GenerateDocImages_${loc_name}")
|
|
|
|
|
|
|
|
add_custom_target(${loc_target_name}
|
|
|
|
COMMENT "Building JKQTMathText Documentation Images: ${loc_name_upper}"
|
|
|
|
COMMAND ${JKQTMathText_GenerateDocImages_COMMAND} --inputfile="${CMAKE_CURRENT_LIST_DIR}/${file}" --outputdir="${JKQTMathText_GenerateDocImages_OutputDir}"
|
|
|
|
WORKING_DIRECTORY ${JKQtPlotter_QT_BINDIR}
|
|
|
|
DEPENDS jkqtmathtext_render
|
|
|
|
)
|
|
|
|
|
|
|
|
add_dependencies(JKQTMathText_GenerateDocImages ${loc_target_name})
|
|
|
|
|
|
|
|
unset(loc_name)
|
|
|
|
unset(loc_target_name)
|
|
|
|
unset(loc_name_upper)
|
|
|
|
unset(dummy)
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
add_custom_target(JKQTMathText_GenerateDocImages_listsymbols
|
|
|
|
COMMENT "Building JKQTMathText Documentation Images: LISTSYMBOLS"
|
2022-09-01 20:36:34 +08:00
|
|
|
COMMAND ${JKQTMathText_GenerateDocImages_COMMAND} --listsymbolsfonts=XITS_MATHANDTEXT,FIRA_MATHANDTEXT --listsymbols="${CMAKE_CURRENT_LIST_DIR}/dox/jkqtmathtext_supportedlatexsymbols.dox" --outputdir="${JKQTMathText_GenerateDocImages_OutputDir}/symbols/"
|
2022-08-08 04:20:47 +08:00
|
|
|
WORKING_DIRECTORY ${JKQtPlotter_QT_BINDIR}
|
|
|
|
DEPENDS jkqtmathtext_render
|
|
|
|
)
|
|
|
|
|
|
|
|
add_dependencies(JKQTMathText_GenerateDocImages JKQTMathText_GenerateDocImages_listsymbols)
|
|
|
|
endif()
|
2022-08-26 18:31:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-03 04:59:41 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(JKQtPlotter_BUILD_TOOLS)
|
|
|
|
|
|
|
|
# custom target that generates the images for the JKQTPlotter documentation
|
|
|
|
set(JKQTPlotter_GenerateDocImages_DefaultOptions )
|
|
|
|
|
|
|
|
|
|
|
|
set(JKQTPlotter_GenerateDocImages_COMMAND $<TARGET_FILE:jkqtplotter_doc_imagegenerator> ${JKQTPlotter_GenerateDocImages_DefaultOptions})
|
|
|
|
set(JKQTPlotter_GenerateDocImages_OutputDir "${CMAKE_CURRENT_LIST_DIR}/images/")
|
2023-07-03 16:11:51 +08:00
|
|
|
set(JKQTPlotter_GenerateDocImages_dox "${CMAKE_CURRENT_LIST_DIR}/dox/")
|
2022-09-03 04:59:41 +08:00
|
|
|
|
|
|
|
|
|
|
|
add_custom_target(JKQTPlotter_GenerateDocImages_listplotsymbols
|
|
|
|
COMMENT "Building JKQTPlotter Documentation Images: LISTPLOTSYMBOLS"
|
|
|
|
COMMAND ${JKQTPlotter_GenerateDocImages_COMMAND} --listsymbols --iconsize=32 --outputdir="${JKQTPlotter_GenerateDocImages_OutputDir}/symbols/"
|
|
|
|
WORKING_DIRECTORY ${JKQtPlotter_QT_BINDIR}
|
|
|
|
DEPENDS jkqtplotter_doc_imagegenerator
|
|
|
|
)
|
|
|
|
add_dependencies(JKQTPlotter_GenerateDocImages JKQTPlotter_GenerateDocImages_listplotsymbols)
|
2022-09-06 17:07:52 +08:00
|
|
|
|
|
|
|
add_custom_target(JKQTPlotter_GenerateDocImages_listlinedecorators
|
|
|
|
COMMENT "Building JKQTPlotter Documentation Images: LISTLINEDECORATORS"
|
|
|
|
COMMAND ${JKQTPlotter_GenerateDocImages_COMMAND} --listlinedecorators --iconsize=32 --outputdir="${JKQTPlotter_GenerateDocImages_OutputDir}/linedecorators/"
|
|
|
|
WORKING_DIRECTORY ${JKQtPlotter_QT_BINDIR}
|
|
|
|
DEPENDS jkqtplotter_doc_imagegenerator
|
|
|
|
)
|
|
|
|
add_dependencies(JKQTPlotter_GenerateDocImages JKQTPlotter_GenerateDocImages_listlinedecorators)
|
|
|
|
|
2022-09-15 04:03:46 +08:00
|
|
|
add_custom_target(JKQTPlotter_GenerateDocImages_listerrorindicators
|
|
|
|
COMMENT "Building JKQTPlotter Documentation Images: listerrorindicators"
|
|
|
|
COMMAND ${JKQTPlotter_GenerateDocImages_COMMAND} --listerrorindicators --iconsize=32 --outputdir="${JKQTPlotter_GenerateDocImages_OutputDir}/errorindicators/"
|
|
|
|
WORKING_DIRECTORY ${JKQtPlotter_QT_BINDIR}
|
|
|
|
DEPENDS jkqtplotter_doc_imagegenerator
|
|
|
|
)
|
|
|
|
add_dependencies(JKQTPlotter_GenerateDocImages JKQTPlotter_GenerateDocImages_listerrorindicators)
|
|
|
|
|
2023-07-22 06:14:42 +08:00
|
|
|
add_custom_target(JKQTPlotter_GenerateDocImages_listpalettes
|
|
|
|
COMMENT "Building JKQTPlotter Documentation Images: listpalettes"
|
|
|
|
COMMAND ${JKQTPlotter_GenerateDocImages_COMMAND} --listpalettes --iconsize=256 --outputdir="${JKQTPlotter_GenerateDocImages_OutputDir}/palettes/"
|
|
|
|
WORKING_DIRECTORY ${JKQtPlotter_QT_BINDIR}
|
|
|
|
DEPENDS jkqtplotter_doc_imagegenerator
|
|
|
|
)
|
|
|
|
add_dependencies(JKQTPlotter_GenerateDocImages JKQTPlotter_GenerateDocImages_listpalettes)
|
|
|
|
|
2022-09-24 02:43:53 +08:00
|
|
|
add_custom_target(JKQTPlotter_GenerateDocImages_listaxisstyleprops
|
|
|
|
COMMENT "Building JKQTPlotter Documentation Images: listaxisstyleprops"
|
|
|
|
COMMAND ${JKQTPlotter_GenerateDocImages_COMMAND} --listaxisstyleprops --background=lightgrey --iconsize=50 --outputdir="${JKQTPlotter_GenerateDocImages_OutputDir}/axisstyle/"
|
2022-09-22 06:44:54 +08:00
|
|
|
WORKING_DIRECTORY ${JKQtPlotter_QT_BINDIR}
|
|
|
|
DEPENDS jkqtplotter_doc_imagegenerator
|
|
|
|
)
|
2022-09-24 02:43:53 +08:00
|
|
|
add_dependencies(JKQTPlotter_GenerateDocImages JKQTPlotter_GenerateDocImages_listaxisstyleprops)
|
2022-09-22 06:44:54 +08:00
|
|
|
|
2023-07-03 05:01:56 +08:00
|
|
|
add_custom_target(JKQTPlotter_GenerateDocImages_liststyles
|
|
|
|
COMMENT "Building JKQTPlotter Documentation Images: liststyles"
|
2023-07-22 06:14:42 +08:00
|
|
|
COMMAND ${JKQTPlotter_GenerateDocImages_COMMAND} --liststyles --iconsize=1200 --outputdir="${JKQTPlotter_GenerateDocImages_OutputDir}/styles/" --doctomodify="${JKQTPlotter_GenerateDocImages_dox}/jkqtplotter_styling.dox"
|
2023-07-03 05:01:56 +08:00
|
|
|
WORKING_DIRECTORY ${JKQtPlotter_QT_BINDIR}
|
|
|
|
DEPENDS jkqtplotter_doc_imagegenerator
|
|
|
|
)
|
2023-07-22 06:14:42 +08:00
|
|
|
add_dependencies(JKQTPlotter_GenerateDocImages JKQTPlotter_GenerateDocImages_liststyles)
|
2023-07-03 05:01:56 +08:00
|
|
|
|
2022-09-03 04:59:41 +08:00
|
|
|
endif(JKQtPlotter_BUILD_TOOLS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-26 18:31:27 +08:00
|
|
|
if(JKQtPlotter_BUILD_EXAMPLES)
|
|
|
|
|
|
|
|
# custom target that generates the images for the JKQTMathText documentation
|
2022-08-27 04:41:10 +08:00
|
|
|
set(JKQTPlotter_GenerateDocScreenshots_DefaultOptions --screenshotdir="${CMAKE_CURRENT_LIST_DIR}/../screenshots/" --screenshot --disablehighdpi --smallscreenshotplot)
|
2022-08-27 04:32:48 +08:00
|
|
|
# list examples for which to save a screenshot
|
|
|
|
# the output basename equals the example name in this list,
|
|
|
|
# unless you specify the basenames by adding it/them after a slash '/'
|
|
|
|
# e.g. "barchart/barchart,barchart_hor"
|
2022-08-29 04:48:14 +08:00
|
|
|
# the basenames are applied to the windows in the order of their windowTitle()s!
|
2022-08-26 18:31:27 +08:00
|
|
|
set(JKQTPlotter_GenerateDocScreenshots_From
|
2022-08-30 03:46:38 +08:00
|
|
|
scatter/scatter,scatter_error
|
2022-09-08 03:38:29 +08:00
|
|
|
scatter_customsymbol
|
2022-08-27 04:32:48 +08:00
|
|
|
simpletest
|
2022-08-29 04:48:14 +08:00
|
|
|
barchart/barchart,barchart_hor
|
2022-09-10 20:35:16 +08:00
|
|
|
barchart_twocolor/barchart_twocolor,barchart_twocolor_hor
|
2022-09-11 06:06:47 +08:00
|
|
|
barchart_errorbars/barchart_errorbars,barchart_errorbars_hor
|
2022-10-22 22:40:44 +08:00
|
|
|
barchart_functorfill/barchart_functorfill,barchart_functorfill_hor
|
2022-10-29 03:48:42 +08:00
|
|
|
barchart_customdrawfunctor/barchart_customdrawfunctor,barchart_customdrawfunctor_hor
|
2022-08-27 04:32:48 +08:00
|
|
|
wiggleplots/wiggleplot_x,wiggleplot_y
|
|
|
|
advplotstyling/advancedlineandfillstyling
|
|
|
|
boxplot
|
|
|
|
contourplot
|
|
|
|
violinplot/violinplot_hor,violinplot_vert
|
|
|
|
errorbarstyles
|
|
|
|
dateaxes/dateaxes,dateaxes_timeaxis
|
|
|
|
distributionplot/test_distributionplot
|
|
|
|
evalcurve
|
2022-08-29 04:48:14 +08:00
|
|
|
filledgraphs/filledgraphs,filledgraphs_y
|
2022-09-11 06:06:47 +08:00
|
|
|
filledgraphs_errors/filledgraphs_errors,filledgraphs_errors_y
|
2022-08-27 04:32:48 +08:00
|
|
|
functionplot/functionplot,functionplot_fy
|
2022-08-27 04:41:10 +08:00
|
|
|
styledboxplot/test_styledboxplot
|
2022-08-29 04:48:14 +08:00
|
|
|
multiplot/multiplot,multiplot_controlwindow
|
|
|
|
#symbols_and_styles
|
|
|
|
symbols_and_errors
|
|
|
|
stepplots
|
|
|
|
stackedbars/stackedbars,stackedbars_hor
|
|
|
|
#geo_arrows
|
|
|
|
#geo_simple
|
|
|
|
geometric
|
2023-08-04 21:33:03 +08:00
|
|
|
imageplot/imageplot,imageplot__scale02,imageplot__smallscalelimitcolor,imageplot__smallscalecolor,imageplot__smallscaletransparent/--iteratefunctorsteps
|
2022-08-29 04:48:14 +08:00
|
|
|
imageplot_modifier
|
|
|
|
imageplot_nodatastore
|
|
|
|
imageplot_userpal/imageplot_userpal_program
|
2022-09-26 08:08:01 +08:00
|
|
|
impulsesplot/impulsesplot,impulsesplot_symbols,impulsesplot_horizontal,errorbarstyles_impulses,errorbarstyles_impulses_horizontal
|
2022-08-29 04:48:14 +08:00
|
|
|
parametriccurve/parametriccurve1,parametriccurve2
|
|
|
|
paramscatterplot
|
2022-09-08 03:38:29 +08:00
|
|
|
paramscatterplot_customsymbol
|
2022-08-29 04:48:14 +08:00
|
|
|
#paramscatterplot_image
|
|
|
|
parsedfunctionplot
|
|
|
|
rgbimageplot
|
2022-10-31 04:52:30 +08:00
|
|
|
rgbimageplot_qt/rgbimageplot_qt,rgbimageplot_qt_upsidedown/--iteratefunctorsteps
|
2022-08-29 04:48:14 +08:00
|
|
|
mandelbrot
|
2022-09-25 21:34:05 +08:00
|
|
|
geo_coordinateaxis0
|
2023-03-23 20:55:18 +08:00
|
|
|
second_axis/second_axis,second_axis_hor
|
2023-08-04 21:33:03 +08:00
|
|
|
logaxes/logaxes,logaxes_nolog,logaxes_nominorgrid/--iteratefunctorsteps
|
2022-08-29 04:48:14 +08:00
|
|
|
#speed
|
2023-08-14 18:37:22 +08:00
|
|
|
datastore/datastore,datastore_sine,datastore_linkedcarray,datastore_map,datastore_calccolumns,datastore_image,datastore_image_sorted,datastore_sineimg/--iteratefunctorsteps
|
2022-08-29 04:48:14 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# custom target that generates the images for the JKQTMathText documentation
|
|
|
|
set(JKQTPlotter_GenerateDocImage_DefaultOptions --screenshotdir="${CMAKE_CURRENT_LIST_DIR}/../doc/images/" --screenshotplot --disablehighdpi)
|
|
|
|
set(JKQTPlotter_GenerateDocImages_From
|
2022-08-30 03:46:38 +08:00
|
|
|
stackedbars/JKQTPbarVerticalGraphStacked,JKQTPbarHorizontalGraphStacked/--smallscreenshotplot
|
|
|
|
scatter/JKQTPXYScatterGraph,JKQTPXYScatterErrorGraph/--smallscreenshotplot
|
|
|
|
simpletest/JKQTPXYLineGraph/--smallscreenshotplot
|
2022-11-01 03:34:01 +08:00
|
|
|
barchart/JKQTPBarVerticalGraph,JKQTPBarHorizontalGraph,JKQTPBarVerticalGraphNoBaseline,JKQTPBarHorizontalGraphNoBaseline,JKQTPBarVerticalGraphBaseline,JKQTPBarHorizontalGraphBaseline/--iteratefunctorsteps--smallscreenshotplot
|
2022-09-10 20:35:16 +08:00
|
|
|
barchart_twocolor/JKQTPBarVerticalGraphTwoColorFilling,JKQTPBarHorizontalGraphTwoColorFilling/--smallscreenshotplot
|
2022-09-11 06:06:47 +08:00
|
|
|
barchart_errorbars/JKQTPBarVerticalErrorGraph,JKQTPBarHorizontalErrorGraph/--smallscreenshotplot
|
2022-10-22 22:40:44 +08:00
|
|
|
barchart_functorfill/JKQTPBarVerticalGraphFunctorFilling,JKQTPBarHorizontalGraphFunctorFilling/--smallscreenshotplot
|
2022-10-29 03:48:42 +08:00
|
|
|
barchart_customdrawfunctor/JKQTPBarVerticalGraphCustomDrawFunctor,JKQTPBarHorizontalGraphCustomDrawFunctor/--smallscreenshotplot
|
2022-08-29 04:48:14 +08:00
|
|
|
wiggleplots/JKQTPFilledCurveXGraph_wiggle,JKQTPFilledCurveYGraph_wiggle
|
2022-08-30 03:46:38 +08:00
|
|
|
contourplot/JKQTPColumnContourPlot/--smallscreenshotplot
|
|
|
|
filledgraphs/JKQTPFilledCurveXGraph,JKQTPFilledCurveYGraph/--smallscreenshotplot
|
2022-09-11 06:06:47 +08:00
|
|
|
filledgraphs_errors/JKQTPFilledCurveXErrorGraph,JKQTPFilledCurveYErrorGraph/--smallscreenshotplot
|
2022-08-30 03:46:38 +08:00
|
|
|
evalcurve/JKQTPXYFunctionLineGraph/--smallscreenshotplot
|
2022-09-25 21:34:05 +08:00
|
|
|
geo_coordinateaxis0/JKQTPCoordinateAxisStyleDrawMode0
|
2022-11-01 03:34:01 +08:00
|
|
|
impulsesplot/JKQTPImpulsesVerticalGraph,JKQTPImpulsesVerticalGraph_Symbols,JKQTPImpulsesHorizontalGraph,JKQTPImpulsesVerticalErrorGraph,JKQTPImpulsesHorizontalErrorGraph,JKQTPImpulsesVerticalGraphNoBaseline,JKQTPImpulsesVerticalGraph_SymbolsNoBaseline,JKQTPImpulsesHorizontalGraphNoBaseline,JKQTPImpulsesVerticalErrorGraphNoBaseline,JKQTPImpulsesHorizontalErrorGraphNoBaseline,JKQTPImpulsesVerticalGraphBaseline,JKQTPImpulsesVerticalGraph_SymbolsBaseline,JKQTPImpulsesHorizontalGraphBaseline,JKQTPImpulsesVerticalErrorGraphBaseline,JKQTPImpulsesHorizontalErrorGraphBaseline/--iteratefunctorsteps--smallscreenshotplot
|
2022-09-26 08:08:01 +08:00
|
|
|
symbols_and_errors/JKQTPXYLineErrorGraph_JKQTPErrorBars,JKQTPXYLineErrorGraph_JKQTPErrorLines,JKQTPXYLineErrorGraph_JKQTPErrorPolygons/--iteratefunctorsteps--iteratefunctorsteps_suppressinitial--smallscreenshotplot
|
|
|
|
boxplot/JKQTPBoxplotVerticalGraph,JKQTPBoxplotHorizontalGraph/--iteratefunctorsteps--iteratefunctorsteps_suppressinitial--smallscreenshotplot
|
2023-03-23 20:55:18 +08:00
|
|
|
second_axis/JKQTBasePlotter_addSecondaryYAxis,JKQTBasePlotter_addSecondaryXAxis
|
2022-08-26 18:31:27 +08:00
|
|
|
)
|
|
|
|
|
2022-08-29 04:48:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-27 04:32:48 +08:00
|
|
|
foreach(ex ${JKQTPlotter_GenerateDocScreenshots_From})
|
2022-10-31 04:52:30 +08:00
|
|
|
set(example ${ex})
|
|
|
|
set(basename ${ex})
|
2022-08-27 04:32:48 +08:00
|
|
|
string(REGEX MATCH "(.+)/(.+)" dummy ${ex})
|
2022-08-30 03:46:38 +08:00
|
|
|
set(extra_command "")
|
2022-08-27 04:32:48 +08:00
|
|
|
if(CMAKE_MATCH_1 STREQUAL "" OR CMAKE_MATCH_2 STREQUAL "")
|
|
|
|
set(example ${ex})
|
|
|
|
set(basename ${ex})
|
|
|
|
else()
|
|
|
|
set(example ${CMAKE_MATCH_1})
|
|
|
|
set(basename ${CMAKE_MATCH_2})
|
2022-10-31 04:52:30 +08:00
|
|
|
set(CMAKE_MATCH_3 "")
|
|
|
|
string(REGEX MATCH "(.+)/(.*)/(.+)" dummy ${ex})
|
2022-08-30 03:46:38 +08:00
|
|
|
if(NOT (CMAKE_MATCH_3 STREQUAL ""))
|
|
|
|
set(example ${CMAKE_MATCH_1})
|
|
|
|
set(basename ${CMAKE_MATCH_2})
|
|
|
|
set(extra_command ${CMAKE_MATCH_3})
|
|
|
|
endif()
|
2022-10-31 04:52:30 +08:00
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (NOT extra_command STREQUAL "")
|
|
|
|
string(REPLACE "--" ";--" extra_command "${extra_command}")
|
2022-08-27 04:32:48 +08:00
|
|
|
endif()
|
|
|
|
|
2022-09-26 08:08:01 +08:00
|
|
|
|
2022-08-26 18:31:27 +08:00
|
|
|
set(loc_target_name JKQTPlotter_GenerateDocScreenshots_${example})
|
|
|
|
set(dep_name jkqtptest_${example})
|
2022-08-27 04:32:48 +08:00
|
|
|
string(TOUPPER ${example} example_upper)
|
2022-08-26 18:31:27 +08:00
|
|
|
add_custom_target(${loc_target_name}
|
2022-08-27 04:32:48 +08:00
|
|
|
COMMENT "Building JKQTPlotter Documentation Screenshot: ${example_upper}"
|
2022-08-30 03:46:38 +08:00
|
|
|
COMMAND $<TARGET_FILE:${dep_name}> ${JKQTPlotter_GenerateDocScreenshots_DefaultOptions} --screenshotbasename=${basename} ${extra_command}
|
2022-08-26 18:31:27 +08:00
|
|
|
WORKING_DIRECTORY ${JKQtPlotter_QT_BINDIR}
|
|
|
|
DEPENDS ${dep_name}
|
|
|
|
)
|
|
|
|
|
|
|
|
add_dependencies(JKQTPlotter_GenerateDocScreenshots ${loc_target_name})
|
|
|
|
|
|
|
|
unset(loc_target_name)
|
|
|
|
unset(dep_name)
|
2022-08-27 04:32:48 +08:00
|
|
|
unset(example)
|
|
|
|
unset(example_upper)
|
|
|
|
unset(basename)
|
2022-08-26 18:31:27 +08:00
|
|
|
endforeach()
|
|
|
|
|
2022-08-29 04:48:14 +08:00
|
|
|
|
|
|
|
foreach(ex ${JKQTPlotter_GenerateDocImages_From})
|
|
|
|
string(REGEX MATCH "(.+)/(.+)" dummy ${ex})
|
2022-08-30 03:46:38 +08:00
|
|
|
set(extra_command "")
|
2022-08-29 04:48:14 +08:00
|
|
|
if(CMAKE_MATCH_1 STREQUAL "" OR CMAKE_MATCH_2 STREQUAL "")
|
|
|
|
set(example ${ex})
|
|
|
|
set(basename ${ex})
|
|
|
|
else()
|
|
|
|
set(example ${CMAKE_MATCH_1})
|
|
|
|
set(basename ${CMAKE_MATCH_2})
|
2022-08-30 03:46:38 +08:00
|
|
|
string(REGEX MATCH "(.+)/(.*)/(.+)" dummy ${ex})
|
|
|
|
if(NOT (CMAKE_MATCH_3 STREQUAL ""))
|
|
|
|
set(example ${CMAKE_MATCH_1})
|
|
|
|
set(basename ${CMAKE_MATCH_2})
|
|
|
|
set(extra_command ${CMAKE_MATCH_3})
|
|
|
|
endif()
|
|
|
|
|
2022-08-29 04:48:14 +08:00
|
|
|
endif()
|
|
|
|
|
2022-09-26 08:08:01 +08:00
|
|
|
if (NOT extra_command STREQUAL "")
|
|
|
|
string(REPLACE "--" ";--" extra_command "${extra_command}")
|
|
|
|
endif()
|
|
|
|
|
2022-08-29 04:48:14 +08:00
|
|
|
set(loc_target_name JKQTPlotter_GenerateDocImages_${example})
|
|
|
|
set(dep_name jkqtptest_${example})
|
|
|
|
string(TOUPPER ${example} example_upper)
|
|
|
|
add_custom_target(${loc_target_name}
|
|
|
|
COMMENT "Building JKQTPlotter Documentation Image: ${example_upper}"
|
2022-08-30 03:46:38 +08:00
|
|
|
COMMAND $<TARGET_FILE:${dep_name}> ${JKQTPlotter_GenerateDocImage_DefaultOptions} --screenshotbasename=${basename} ${extra_command}
|
2022-08-29 04:48:14 +08:00
|
|
|
WORKING_DIRECTORY ${JKQtPlotter_QT_BINDIR}
|
|
|
|
DEPENDS ${dep_name}
|
|
|
|
)
|
|
|
|
|
|
|
|
add_dependencies(JKQTPlotter_GenerateDocImages ${loc_target_name})
|
|
|
|
|
|
|
|
unset(loc_target_name)
|
|
|
|
unset(dep_name)
|
|
|
|
unset(example)
|
|
|
|
unset(example_upper)
|
|
|
|
unset(basename)
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
|
2022-08-26 18:31:27 +08:00
|
|
|
endif()
|