Warning, /graphics/digikam/core/libs/dimg/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 #
0002 # SPDX-FileCopyrightText: 2010-2024 by Gilles Caulier, <caulier dot gilles at gmail dot com>
0003 # SPDX-FileCopyrightText: 2015      by Veaceslav Munteanu, <veaceslav dot munteanu90 at gmail dot com>
0004 #
0005 # SPDX-License-Identifier: BSD-3-Clause
0006 #
0007 
0008 APPLY_COMMON_POLICIES()
0009 
0010 kde_enable_exceptions()
0011 
0012 include_directories(${LCMS2_INCLUDE_DIR})
0013 
0014 set(libdimg_SRCS
0015     ${CMAKE_CURRENT_SOURCE_DIR}/dimg.cpp
0016     ${CMAKE_CURRENT_SOURCE_DIR}/dimg_bitsops.cpp
0017     ${CMAKE_CURRENT_SOURCE_DIR}/dimg_colors.cpp
0018     ${CMAKE_CURRENT_SOURCE_DIR}/dimg_copy.cpp
0019     ${CMAKE_CURRENT_SOURCE_DIR}/dimg_data.cpp
0020     ${CMAKE_CURRENT_SOURCE_DIR}/dimg_fileio.cpp
0021     ${CMAKE_CURRENT_SOURCE_DIR}/dimg_metadata.cpp
0022     ${CMAKE_CURRENT_SOURCE_DIR}/dimg_props.cpp
0023     ${CMAKE_CURRENT_SOURCE_DIR}/dimg_qimage.cpp
0024     ${CMAKE_CURRENT_SOURCE_DIR}/dimg_qpixmap.cpp
0025     ${CMAKE_CURRENT_SOURCE_DIR}/dimg_scale.cpp
0026     ${CMAKE_CURRENT_SOURCE_DIR}/dimg_transform.cpp
0027 
0028     ${CMAKE_CURRENT_SOURCE_DIR}/color/dcolor.cpp
0029     ${CMAKE_CURRENT_SOURCE_DIR}/color/dcolorcomposer.cpp
0030 
0031     ${CMAKE_CURRENT_SOURCE_DIR}/history/dimagehistory.cpp
0032     ${CMAKE_CURRENT_SOURCE_DIR}/history/filteraction.cpp
0033     ${CMAKE_CURRENT_SOURCE_DIR}/history/historyimageid.cpp
0034 )
0035 
0036 set(libdimgfilters_SRCS
0037     ${CMAKE_CURRENT_SOURCE_DIR}/filters/dimgbuiltinfilter.cpp
0038     ${CMAKE_CURRENT_SOURCE_DIR}/filters/dimgthreadedfilter.cpp
0039     ${CMAKE_CURRENT_SOURCE_DIR}/filters/dimgthreadedanalyser.cpp
0040     ${CMAKE_CURRENT_SOURCE_DIR}/filters/dimgfiltermanager.cpp
0041     ${CMAKE_CURRENT_SOURCE_DIR}/filters/dimgfiltergenerator.cpp
0042     ${CMAKE_CURRENT_SOURCE_DIR}/filters/dpixelsaliasfilter.cpp
0043     ${CMAKE_CURRENT_SOURCE_DIR}/filters/filteractionfilter.cpp
0044     ${CMAKE_CURRENT_SOURCE_DIR}/filters/randomnumbergenerator.cpp
0045     ${CMAKE_CURRENT_SOURCE_DIR}/filters/raw/rawprocessingfilter.cpp
0046     ${CMAKE_CURRENT_SOURCE_DIR}/filters/raw/drawdecoding.cpp
0047     ${CMAKE_CURRENT_SOURCE_DIR}/filters/decorate/borderfilter.cpp
0048     ${CMAKE_CURRENT_SOURCE_DIR}/filters/decorate/bordersettings.cpp
0049     ${CMAKE_CURRENT_SOURCE_DIR}/filters/decorate/bordercontainer.cpp
0050     ${CMAKE_CURRENT_SOURCE_DIR}/filters/decorate/texturecontainer.cpp
0051     ${CMAKE_CURRENT_SOURCE_DIR}/filters/decorate/texturefilter.cpp
0052     ${CMAKE_CURRENT_SOURCE_DIR}/filters/decorate/texturesettings.cpp
0053     ${CMAKE_CURRENT_SOURCE_DIR}/filters/film/filmfilter.cpp
0054     ${CMAKE_CURRENT_SOURCE_DIR}/filters/fx/blurfilter.cpp
0055     ${CMAKE_CURRENT_SOURCE_DIR}/filters/fx/blurfxfilter.cpp
0056     ${CMAKE_CURRENT_SOURCE_DIR}/filters/fx/colorfxfilter.cpp
0057     ${CMAKE_CURRENT_SOURCE_DIR}/filters/fx/colorfxsettings.cpp
0058     ${CMAKE_CURRENT_SOURCE_DIR}/filters/fx/distortionfxfilter.cpp
0059     ${CMAKE_CURRENT_SOURCE_DIR}/filters/fx/charcoalfilter.cpp
0060     ${CMAKE_CURRENT_SOURCE_DIR}/filters/fx/embossfilter.cpp
0061     ${CMAKE_CURRENT_SOURCE_DIR}/filters/fx/filmgrainfilter.cpp
0062     ${CMAKE_CURRENT_SOURCE_DIR}/filters/fx/filmgrainsettings.cpp
0063     ${CMAKE_CURRENT_SOURCE_DIR}/filters/fx/invertfilter.cpp
0064     ${CMAKE_CURRENT_SOURCE_DIR}/filters/fx/oilpaintfilter.cpp
0065     ${CMAKE_CURRENT_SOURCE_DIR}/filters/fx/raindropfilter.cpp
0066     ${CMAKE_CURRENT_SOURCE_DIR}/filters/auto/autolevelsfilter.cpp
0067     ${CMAKE_CURRENT_SOURCE_DIR}/filters/auto/autoexpofilter.cpp
0068     ${CMAKE_CURRENT_SOURCE_DIR}/filters/auto/equalizefilter.cpp
0069     ${CMAKE_CURRENT_SOURCE_DIR}/filters/auto/stretchfilter.cpp
0070     ${CMAKE_CURRENT_SOURCE_DIR}/filters/auto/normalizefilter.cpp
0071     ${CMAKE_CURRENT_SOURCE_DIR}/filters/cb/cbfilter.cpp
0072     ${CMAKE_CURRENT_SOURCE_DIR}/filters/cb/cbsettings.cpp
0073     ${CMAKE_CURRENT_SOURCE_DIR}/filters/bcg/bcgfilter.cpp
0074     ${CMAKE_CURRENT_SOURCE_DIR}/filters/bcg/bcgsettings.cpp
0075     ${CMAKE_CURRENT_SOURCE_DIR}/filters/bcg/bcgcontainer.cpp
0076     ${CMAKE_CURRENT_SOURCE_DIR}/filters/bw/bwsepiafilter.cpp
0077     ${CMAKE_CURRENT_SOURCE_DIR}/filters/bw/bwsepiasettings.cpp
0078     ${CMAKE_CURRENT_SOURCE_DIR}/filters/bw/tonalityfilter.cpp
0079     ${CMAKE_CURRENT_SOURCE_DIR}/filters/bw/infraredfilter.cpp
0080     ${CMAKE_CURRENT_SOURCE_DIR}/filters/bw/mixerfilter.cpp
0081     ${CMAKE_CURRENT_SOURCE_DIR}/filters/bw/mixersettings.cpp
0082     ${CMAKE_CURRENT_SOURCE_DIR}/filters/hsl/hslfilter.cpp
0083     ${CMAKE_CURRENT_SOURCE_DIR}/filters/hsl/hslsettings.cpp
0084     ${CMAKE_CURRENT_SOURCE_DIR}/filters/hsl/hspreviewwidget.cpp
0085     ${CMAKE_CURRENT_SOURCE_DIR}/filters/hotpixels/blackframeparser.cpp
0086     ${CMAKE_CURRENT_SOURCE_DIR}/filters/hotpixels/blackframelistview.cpp
0087     ${CMAKE_CURRENT_SOURCE_DIR}/filters/hotpixels/blackframelistviewitem.cpp
0088     ${CMAKE_CURRENT_SOURCE_DIR}/filters/hotpixels/blackframetooltip.cpp
0089     ${CMAKE_CURRENT_SOURCE_DIR}/filters/hotpixels/hotpixelprops.cpp
0090     ${CMAKE_CURRENT_SOURCE_DIR}/filters/hotpixels/hotpixelfixer.cpp
0091     ${CMAKE_CURRENT_SOURCE_DIR}/filters/hotpixels/hotpixelsweights.cpp
0092     ${CMAKE_CURRENT_SOURCE_DIR}/filters/hotpixels/hotpixelsettings.cpp
0093     ${CMAKE_CURRENT_SOURCE_DIR}/filters/hotpixels/hotpixelcontainer.cpp
0094     ${CMAKE_CURRENT_SOURCE_DIR}/filters/icc/iccmanager.cpp
0095     ${CMAKE_CURRENT_SOURCE_DIR}/filters/icc/iccprofile.cpp
0096     ${CMAKE_CURRENT_SOURCE_DIR}/filters/icc/iccprofilesettings.cpp
0097     ${CMAKE_CURRENT_SOURCE_DIR}/filters/icc/icctransform.cpp
0098     ${CMAKE_CURRENT_SOURCE_DIR}/filters/icc/icctransformfilter.cpp
0099     ${CMAKE_CURRENT_SOURCE_DIR}/filters/icc/iccsettings.cpp
0100     ${CMAKE_CURRENT_SOURCE_DIR}/filters/icc/iccsettings_p.cpp
0101     ${CMAKE_CURRENT_SOURCE_DIR}/filters/icc/iccsettings_p_desktop.cpp
0102     ${CMAKE_CURRENT_SOURCE_DIR}/filters/icc/iccsettingscontainer.cpp
0103     ${CMAKE_CURRENT_SOURCE_DIR}/filters/icc/digikam-lcms.cpp
0104     ${CMAKE_CURRENT_SOURCE_DIR}/filters/lc/localcontrastfilter.cpp
0105     ${CMAKE_CURRENT_SOURCE_DIR}/filters/lc/localcontrastsettings.cpp
0106     ${CMAKE_CURRENT_SOURCE_DIR}/filters/lc/localcontrastcontainer.cpp
0107     ${CMAKE_CURRENT_SOURCE_DIR}/filters/nr/nrfilter.cpp
0108     ${CMAKE_CURRENT_SOURCE_DIR}/filters/nr/nrestimate.cpp
0109     ${CMAKE_CURRENT_SOURCE_DIR}/filters/nr/nrsettings.cpp
0110     ${CMAKE_CURRENT_SOURCE_DIR}/filters/sharp/sharpenfilter.cpp
0111     ${CMAKE_CURRENT_SOURCE_DIR}/filters/sharp/unsharpmaskfilter.cpp
0112     ${CMAKE_CURRENT_SOURCE_DIR}/filters/sharp/sharpsettings.cpp
0113     ${CMAKE_CURRENT_SOURCE_DIR}/filters/levels/imagelevels.cpp
0114     ${CMAKE_CURRENT_SOURCE_DIR}/filters/levels/levelsfilter.cpp
0115     ${CMAKE_CURRENT_SOURCE_DIR}/filters/levels/imagehistogram.cpp
0116     ${CMAKE_CURRENT_SOURCE_DIR}/filters/levels/histogrambox.cpp
0117     ${CMAKE_CURRENT_SOURCE_DIR}/filters/levels/histogramwidget.cpp
0118     ${CMAKE_CURRENT_SOURCE_DIR}/filters/levels/histogrampainter.cpp
0119     ${CMAKE_CURRENT_SOURCE_DIR}/filters/curves/curvescontainer.cpp
0120     ${CMAKE_CURRENT_SOURCE_DIR}/filters/curves/imagecurves.cpp
0121     ${CMAKE_CURRENT_SOURCE_DIR}/filters/curves/curvesfilter.cpp
0122     ${CMAKE_CURRENT_SOURCE_DIR}/filters/curves/curvessettings.cpp
0123     ${CMAKE_CURRENT_SOURCE_DIR}/filters/curves/curveswidget.cpp
0124     ${CMAKE_CURRENT_SOURCE_DIR}/filters/curves/curvesbox.cpp
0125     ${CMAKE_CURRENT_SOURCE_DIR}/filters/wb/wbcontainer.cpp
0126     ${CMAKE_CURRENT_SOURCE_DIR}/filters/wb/wbfilter.cpp
0127     ${CMAKE_CURRENT_SOURCE_DIR}/filters/wb/wbsettings.cpp
0128     ${CMAKE_CURRENT_SOURCE_DIR}/filters/transform/freerotationfilter.cpp
0129     ${CMAKE_CURRENT_SOURCE_DIR}/filters/transform/freerotationsettings.cpp
0130     ${CMAKE_CURRENT_SOURCE_DIR}/filters/transform/shearfilter.cpp
0131     ${CMAKE_CURRENT_SOURCE_DIR}/filters/transform/autocrop.cpp
0132     ${CMAKE_CURRENT_SOURCE_DIR}/filters/greycstoration/greycstorationfilter.cpp
0133     ${CMAKE_CURRENT_SOURCE_DIR}/filters/greycstoration/greycstorationsettings.cpp
0134     ${CMAKE_CURRENT_SOURCE_DIR}/filters/lens/antivignettingfilter.cpp
0135     ${CMAKE_CURRENT_SOURCE_DIR}/filters/lens/antivignettingsettings.cpp
0136     ${CMAKE_CURRENT_SOURCE_DIR}/filters/lens/lensdistortionfilter.cpp
0137     ${CMAKE_CURRENT_SOURCE_DIR}/filters/lens/lensdistortionpixelaccess.cpp
0138     ${CMAKE_CURRENT_SOURCE_DIR}/filters/redeye/redeyecorrectionfilter.cpp
0139     ${CMAKE_CURRENT_SOURCE_DIR}/filters/redeye/redeyecorrectionsettings.cpp
0140     ${CMAKE_CURRENT_SOURCE_DIR}/filters/redeye/redeyecorrectioncontainer.cpp
0141 )
0142 
0143 if(GLIB2_FOUND)
0144 
0145     set(libdimgfilters_SRCS
0146         ${libdimgfilters_SRCS}
0147         ${CMAKE_CURRENT_SOURCE_DIR}/filters/transform/contentawarefilter.cpp
0148         ${CMAKE_CURRENT_SOURCE_DIR}/filters/transform/lqr/lqr_carver_bias.c
0149         ${CMAKE_CURRENT_SOURCE_DIR}/filters/transform/lqr/lqr_carver.c
0150         ${CMAKE_CURRENT_SOURCE_DIR}/filters/transform/lqr/lqr_carver_list.c
0151         ${CMAKE_CURRENT_SOURCE_DIR}/filters/transform/lqr/lqr_carver_rigmask.c
0152         ${CMAKE_CURRENT_SOURCE_DIR}/filters/transform/lqr/lqr_cursor.c
0153         ${CMAKE_CURRENT_SOURCE_DIR}/filters/transform/lqr/lqr_energy.c
0154         ${CMAKE_CURRENT_SOURCE_DIR}/filters/transform/lqr/lqr_gradient.c
0155         ${CMAKE_CURRENT_SOURCE_DIR}/filters/transform/lqr/lqr_progress.c
0156         ${CMAKE_CURRENT_SOURCE_DIR}/filters/transform/lqr/lqr_rwindow.c
0157         ${CMAKE_CURRENT_SOURCE_DIR}/filters/transform/lqr/lqr_vmap.c
0158         ${CMAKE_CURRENT_SOURCE_DIR}/filters/transform/lqr/lqr_vmap_list.c
0159     )
0160 
0161     include_directories(${GLIB2_INCLUDE_DIR})
0162 
0163 endif()
0164 
0165 if(LensFun_FOUND)
0166 
0167     set(libdimgfilters_SRCS
0168         ${libdimgfilters_SRCS}
0169         ${CMAKE_CURRENT_SOURCE_DIR}/filters/lens/lensfunfilter.cpp
0170         ${CMAKE_CURRENT_SOURCE_DIR}/filters/lens/lensfuncameraselector.cpp
0171         ${CMAKE_CURRENT_SOURCE_DIR}/filters/lens/lensfuniface.cpp
0172         ${CMAKE_CURRENT_SOURCE_DIR}/filters/lens/lensfunsettings.cpp
0173     )
0174 
0175     include_directories(${LENSFUN_INCLUDE_DIRS})
0176 
0177 endif()
0178 
0179 if(Eigen3_FOUND)
0180 
0181     set(libdimgfilters_SRCS
0182         ${libdimgfilters_SRCS}
0183         ${CMAKE_CURRENT_SOURCE_DIR}/filters/sharp/refocusfilter.cpp
0184         ${CMAKE_CURRENT_SOURCE_DIR}/filters/sharp/refocusmatrix.cpp
0185     )
0186 
0187     include_directories(${EIGEN3_INCLUDE_DIR})
0188 
0189 endif()
0190 
0191 set(libdimgloaders_SRCS
0192     ${CMAKE_CURRENT_SOURCE_DIR}/loaders/dimgloader.cpp
0193     ${CMAKE_CURRENT_SOURCE_DIR}/loaders/dimgloadersettings.cpp
0194 )
0195 
0196 include_directories(
0197     $<TARGET_PROPERTY:Qt${QT_VERSION_MAJOR}::Concurrent,INTERFACE_INCLUDE_DIRECTORIES>
0198     $<TARGET_PROPERTY:Qt${QT_VERSION_MAJOR}::Core,INTERFACE_INCLUDE_DIRECTORIES>
0199     $<TARGET_PROPERTY:Qt${QT_VERSION_MAJOR}::Gui,INTERFACE_INCLUDE_DIRECTORIES>
0200     $<TARGET_PROPERTY:Qt${QT_VERSION_MAJOR}::Xml,INTERFACE_INCLUDE_DIRECTORIES>
0201 
0202     $<TARGET_PROPERTY:KF${QT_VERSION_MAJOR}::CoreAddons,INTERFACE_INCLUDE_DIRECTORIES>
0203     $<TARGET_PROPERTY:KF${QT_VERSION_MAJOR}::ConfigCore,INTERFACE_INCLUDE_DIRECTORIES>
0204     $<TARGET_PROPERTY:KF${QT_VERSION_MAJOR}::I18n,INTERFACE_INCLUDE_DIRECTORIES>
0205     $<TARGET_PROPERTY:KF${QT_VERSION_MAJOR}::WidgetsAddons,INTERFACE_INCLUDE_DIRECTORIES>
0206 )
0207 
0208 if(X11_FOUND AND NOT Qt6_FOUND)
0209 
0210     include_directories($<TARGET_PROPERTY:Qt5::X11Extras,INTERFACE_INCLUDE_DIRECTORIES>)
0211 
0212 endif()
0213 
0214 if(X11_FOUND)
0215 
0216     include_directories(${Qt${QT_VERSION_MAJOR}Gui_PRIVATE_INCLUDE_DIRS})
0217 
0218 endif()
0219 
0220 # Don't process automoc on LibCImg headers
0221 
0222 file(GLOB_RECURSE cimg_headers ${CMAKE_CURRENT_SOURCE_DIR}/filters/greycstoration/cimg/*.h)
0223 
0224 foreach(_file ${cimg_headers})
0225 
0226     set_property(SOURCE ${_file} PROPERTY SKIP_AUTOMOC ON)
0227 
0228 endforeach()
0229 
0230 # Used by digikamcore
0231 add_library(core_dimg_obj OBJECT
0232             ${libdimgloaders_SRCS}
0233             ${libdimgfilters_SRCS}
0234             ${libdimg_SRCS}
0235 )
0236 
0237 target_compile_definitions(core_dimg_obj
0238                            PRIVATE
0239                            digikamcore_EXPORTS
0240 )