########################################
# FUNCTION add_prog_target
########################################
function(add_prog_target target)
set (${target}_src "${ARGN}")
if (WIN32)
set_source_files_properties (${${target}_src} PROPERTIES LANGUAGE CXX)
endif()
add_executable (${target} ${${target}_src})
if (BUILD_SHARED_LIBS)
target_compile_definitions (${target} PRIVATE -DLIBLEPT_IMPORTS)
endif()
target_link_libraries (${target} leptonica)
set_target_properties (${target} PROPERTIES FOLDER prog)
endfunction(add_prog_target)
########################################
add_prog_target(adaptmap_reg adaptmap_reg.c)
add_prog_target(adaptnorm_reg adaptnorm_reg.c)
add_prog_target(affine_reg affine_reg.c)
add_prog_target(alltests_reg alltests_reg.c)
add_prog_target(alphaops_reg alphaops_reg.c)
add_prog_target(alphaxform_reg alphaxform_reg.c)
add_prog_target(baseline_reg baseline_reg.c)
add_prog_target(bilateral1_reg bilateral1_reg.c)
add_prog_target(bilateral2_reg bilateral2_reg.c)
add_prog_target(bilinear_reg bilinear_reg.c)
add_prog_target(binarize_reg binarize_reg.c)
add_prog_target(binmorph1_reg binmorph1_reg.c)
add_prog_target(binmorph2_reg binmorph2_reg.c)
add_prog_target(binmorph3_reg binmorph3_reg.c)
add_prog_target(binmorph4_reg binmorph4_reg.c)
add_prog_target(binmorph5_reg binmorph5_reg.c)
add_prog_target(blackwhite_reg blackwhite_reg.c)
add_prog_target(blend1_reg blend1_reg.c)
add_prog_target(blend2_reg blend2_reg.c)
add_prog_target(blend3_reg blend3_reg.c)
add_prog_target(blend4_reg blend4_reg.c)
add_prog_target(blend5_reg blend5_reg.c)
add_prog_target(boxa1_reg boxa1_reg.c)
add_prog_target(boxa2_reg boxa2_reg.c)
add_prog_target(boxa3_reg boxa3_reg.c)
add_prog_target(boxa4_reg boxa4_reg.c)
add_prog_target(bytea_reg bytea_reg.c)
add_prog_target(ccthin1_reg ccthin1_reg.c)
add_prog_target(ccthin2_reg ccthin2_reg.c)
add_prog_target(checkerboard_reg checkerboard_reg.c)
add_prog_target(cmapquant_reg cmapquant_reg.c)
add_prog_target(colorcontent_reg colorcontent_reg.c)
add_prog_target(coloring_reg coloring_reg.c)
add_prog_target(colorize_reg colorize_reg.c)
add_prog_target(colormask_reg colormask_reg.c)
add_prog_target(colormorph_reg colormorph_reg.c)
add_prog_target(colorquant_reg colorquant_reg.c)
add_prog_target(colorseg_reg colorseg_reg.c)
add_prog_target(colorspace_reg colorspace_reg.c)
add_prog_target(compare_reg compare_reg.c)
add_prog_target(compfilter_reg compfilter_reg.c)
add_prog_target(conncomp_reg conncomp_reg.c)
add_prog_target(conversion_reg conversion_reg.c)
add_prog_target(convolve_reg convolve_reg.c)
add_prog_target(dewarp_reg dewarp_reg.c)
add_prog_target(distance_reg distance_reg.c)
add_prog_target(dither_reg dither_reg.c)
add_prog_target(dna_reg dna_reg.c)
add_prog_target(dwamorph1_reg dwamorph1_reg.c dwalinear.3.c dwalinearlow.3.c)
add_prog_target(dwamorph2_reg dwamorph2_reg.c dwalinear.3.c dwalinearlow.3.c)
add_prog_target(edge_reg edge_reg.c)
add_prog_target(enhance_reg enhance_reg.c)
add_prog_target(equal_reg equal_reg.c)
add_prog_target(expand_reg expand_reg.c)
add_prog_target(extrema_reg extrema_reg.c)
add_prog_target(falsecolor_reg falsecolor_reg.c)
add_prog_target(fhmtauto_reg fhmtauto_reg.c)
add_prog_target(files_reg files_reg.c)
add_prog_target(findcorners_reg findcorners_reg.c)
add_prog_target(findpattern_reg findpattern_reg.c)
add_prog_target(flipdetect_reg flipdetect_reg.c)
add_prog_target(fmorphauto_reg fmorphauto_reg.c)
add_prog_target(fpix1_reg fpix1_reg.c)
add_prog_target(fpix2_reg fpix2_reg.c)
add_prog_target(genfonts_reg genfonts_reg.c)
add_prog_target(gifio_reg gifio_reg.c)
add_prog_target(grayfill_reg grayfill_reg.c)
add_prog_target(graymorph1_reg graymorph1_reg.c)
add_prog_target(graymorph2_reg graymorph2_reg.c)
add_prog_target(grayquant_reg grayquant_reg.c)
add_prog_target(hardlight_reg hardlight_reg.c)
add_prog_target(heap_reg heap_reg.c)
add_prog_target(insert_reg insert_reg.c)
add_prog_target(ioformats_reg ioformats_reg.c)
add_prog_target(iomisc_reg iomisc_reg.c)
add_prog_target(italic_reg italic_reg.c)
add_prog_target(jbclass_reg jbclass_reg.c)
add_prog_target(jp2kio_reg jp2kio_reg.c)
add_prog_target(jpegio_reg jpegio_reg.c)
add_prog_target(kernel_reg kernel_reg.c)
add_prog_target(label_reg label_reg.c)
add_prog_target(lineremoval_reg lineremoval_reg.c)
add_prog_target(locminmax_reg locminmax_reg.c)
add_prog_target(logicops_reg logicops_reg.c)
add_prog_target(lowaccess_reg lowaccess_reg.c)
add_prog_target(lowsat_reg lowsat_reg.c)
add_prog_target(maze_reg maze_reg.c)
add_prog_target(mtiff_reg mtiff_reg.c)
add_prog_target(multitype_reg multitype_reg.c)
add_prog_target(nearline_reg nearline_reg.c)
add_prog_target(newspaper_reg newspaper_reg.c)
add_prog_target(numa1_reg numa1_reg.c)
add_prog_target(numa2_reg numa2_reg.c)
add_prog_target(overlap_reg overlap_reg.c)
add_prog_target(pageseg_reg pageseg_reg.c)
add_prog_target(paintmask_reg paintmask_reg.c)
add_prog_target(paint_reg paint_reg.c)
add_prog_target(pdfio1_reg pdfio1_reg.c)
add_prog_target(pdfio2_reg pdfio2_reg.c)
add_prog_target(pdfseg_reg pdfseg_reg.c)
add_prog_target(pixa1_reg pixa1_reg.c)
add_prog_target(pixa2_reg pixa2_reg.c)
add_prog_target(pixadisp_reg pixadisp_reg.c)
add_prog_target(pixalloc_reg pixalloc_reg.c)
add_prog_target(pixcomp_reg pixcomp_reg.c)
add_prog_target(pixmem_reg pixmem_reg.c)
add_prog_target(pixserial_reg pixserial_reg.c)
add_prog_target(pixtile_reg pixtile_reg.c)
add_prog_target(pngio_reg pngio_reg.c)
add_prog_target(pnmio_reg pnmio_reg.c)
add_prog_target(projection_reg projection_reg.c)
add_prog_target(projective_reg projective_reg.c)
add_prog_target(psioseg_reg psioseg_reg.c)
add_prog_target(psio_reg psio_reg.c)
add_prog_target(pta_reg pta_reg.c)
add_prog_target(ptra1_reg ptra1_reg.c)
add_prog_target(ptra2_reg ptra2_reg.c)
add_prog_target(quadtree_reg quadtree_reg.c)
add_prog_target(rankbin_reg rankbin_reg.c)
add_prog_target(rankhisto_reg rankhisto_reg.c)
add_prog_target(rank_reg rank_reg.c)
add_prog_target(rasteropip_reg rasteropip_reg.c)
add_prog_target(rasterop_reg rasterop_reg.c)
add_prog_target(rectangle_reg rectangle_reg.c)
add_prog_target(rotate1_reg rotate1_reg.c)
add_prog_target(rotate2_reg rotate2_reg.c)
add_prog_target(scale_reg scale_reg.c)
add_prog_target(selio_reg selio_reg.c)
add_prog_target(shear1_reg shear1_reg.c)
add_prog_target(shear2_reg shear2_reg.c)
add_prog_target(skew_reg skew_reg.c)
add_prog_target(smallpix_reg smallpix_reg.c)
add_prog_target(smoothedge_reg smoothedge_reg.c)
add_prog_target(speckle_reg speckle_reg.c)
add_prog_target(splitcomp_reg splitcomp_reg.c)
add_prog_target(string_reg string_reg.c)
add_prog_target(subpixel_reg subpixel_reg.c)
add_prog_target(texturefill_reg texturefill_reg.c)
add_prog_target(threshnorm_reg threshnorm_reg.c)
add_prog_target(translate_reg translate_reg.c)
add_prog_target(warper_reg warper_reg.c)
add_prog_target(watershed_reg watershed_reg.c)
add_prog_target(webpio_reg webpio_reg.c)
add_prog_target(webpanimio_reg webpanimio_reg.c)
add_prog_target(wordboxes_reg wordboxes_reg.c)
add_prog_target(writetext_reg writetext_reg.c)
add_prog_target(xformbox_reg xformbox_reg.c)
add_prog_target(adaptmap_dark adaptmap_dark.c)
add_prog_target(arabic_lines arabic_lines.c)
add_prog_target(arithtest arithtest.c)
add_prog_target(autogentest1 autogentest1.c)
add_prog_target(autogentest2 autogentest2.c autogen.137.c)
add_prog_target(barcodetest barcodetest.c)
add_prog_target(binarize_set binarize_set.c)
add_prog_target(binarizefiles binarizefiles.c)
add_prog_target(bincompare bincompare.c)
add_prog_target(blendcmaptest blendcmaptest.c)
add_prog_target(buffertest buffertest.c)
add_prog_target(ccbordtest ccbordtest.c)
add_prog_target(cctest1 cctest1.c)
add_prog_target(cleanpdf cleanpdf.c)
add_prog_target(colorsegtest colorsegtest.c)
add_prog_target(comparepages comparepages.c)
add_prog_target(comparepixa comparepixa.c)
add_prog_target(comparetest comparetest.c)
add_prog_tar