Warning, /graphics/digikam/core/tests/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 #
0004 # SPDX-License-Identifier: BSD-3-Clause
0005 #
0006
0007 APPLY_COMMON_POLICIES()
0008
0009 # enabling for everything although only required by DImg.
0010 kde_enable_exceptions()
0011
0012 HEADER_DIRECTORIES(${CMAKE_SOURCE_DIR}/core/utilities DK_LOCAL_INCLUDES_UTILS)
0013
0014 include_directories(${DK_LOCAL_INCLUDES}
0015 ${DK_LOCAL_INCLUDES_UTILS}
0016 ${CMAKE_CURRENT_SOURCE_DIR}/
0017 )
0018
0019 # -------------------------------------------------------------------------------
0020 # Unit-tests common dependencies
0021
0022 if(ENABLE_QWEBENGINE)
0023
0024 set(_extra_deps ${_extra_deps} Qt${QT_VERSION_MAJOR}::WebEngineWidgets)
0025
0026 else()
0027
0028 set(_extra_deps ${_extra_deps} Qt${QT_VERSION_MAJOR}::WebKitWidgets)
0029
0030 endif()
0031
0032 if(ENABLE_DBUS)
0033
0034 set(_extra_deps ${_extra_deps} Qt${QT_VERSION_MAJOR}::DBus)
0035
0036 endif()
0037
0038 if(KF${QT_VERSION_MAJOR}Notifications_FOUND)
0039
0040 set(_extra_deps ${_extra_deps} KF${QT_VERSION_MAJOR}::Notifications)
0041
0042 endif()
0043
0044 if(Gphoto2_FOUND)
0045
0046 set(_extra_deps ${_extra_deps} ${GPHOTO2_LIBRARIES})
0047
0048 endif()
0049
0050 if(ImageMagick_Magick++_FOUND)
0051
0052 set(_extra_deps ${_extra_deps} ${ImageMagick_LIBRARIES})
0053
0054 endif()
0055
0056 if(LensFun_FOUND)
0057
0058 set(_extra_deps ${_extra_deps} ${LENSFUN_LIBRARIES})
0059
0060 endif()
0061
0062 if(Jasper_FOUND)
0063
0064 set(_extra_deps ${_extra_deps} ${JASPER_LIBRARIES})
0065
0066 endif()
0067
0068 if(ENABLE_MEDIAPLAYER)
0069
0070 set(_extra_deps ${_extra_deps} ${MEDIAPLAYER_LIBRARIES})
0071
0072 endif()
0073
0074 if(WIN32)
0075
0076 set(_extra_deps ${_extra_deps} ws2_32)
0077
0078 endif()
0079
0080 if(NOT WIN32)
0081
0082 # To link under Solaris (see bug #274484)
0083 set(_extra_deps ${_extra_deps} ${MATH_LIBRARY})
0084
0085 endif()
0086
0087 if(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
0088
0089 set(_extra_deps ${_extra_deps} ${KVM_LIBRARY})
0090
0091 endif()
0092
0093 if(APPLE)
0094
0095 set(_extra_deps ${_extra_deps} /System/Library/Frameworks/AppKit.framework)
0096
0097 endif()
0098
0099 set(COMMON_TEST_LINK Qt${QT_VERSION_MAJOR}::Core
0100 Qt${QT_VERSION_MAJOR}::Gui
0101 Qt${QT_VERSION_MAJOR}::Xml
0102 Qt${QT_VERSION_MAJOR}::Widgets
0103 Qt${QT_VERSION_MAJOR}::Concurrent
0104 Qt${QT_VERSION_MAJOR}::Test
0105 Qt${QT_VERSION_MAJOR}::Sql
0106
0107 KF${QT_VERSION_MAJOR}::XmlGui
0108 KF${QT_VERSION_MAJOR}::I18n
0109 KF${QT_VERSION_MAJOR}::ConfigCore
0110 KF${QT_VERSION_MAJOR}::CoreAddons
0111 KF${QT_VERSION_MAJOR}::Service
0112 KF${QT_VERSION_MAJOR}::Solid
0113
0114 ${OPENMP_LDFLAGS}
0115 ${JPEG_LIBRARIES}
0116 ${LCMS2_LIBRARIES}
0117 ${EXPAT_LIBRARY}
0118 ${CMAKE_THREAD_LIBS_INIT}
0119
0120 opencv_core
0121 opencv_objdetect
0122 opencv_imgproc
0123 opencv_imgcodecs
0124 opencv_dnn
0125 opencv_flann
0126
0127 ${_extra_deps}
0128 )
0129
0130 # -------------------------------------------------------------------------------
0131 # Common static library for uint-tests based on ModelTest
0132
0133 include_directories(modeltest)
0134
0135 add_library(libmodeltest STATIC
0136 modeltest/modeltest.cpp
0137 )
0138
0139 target_link_libraries(libmodeltest
0140 PRIVATE
0141 Qt${QT_VERSION_MAJOR}::Core
0142 Qt${QT_VERSION_MAJOR}::Test
0143 )
0144
0145 # -------------------------------------------------------------------------------
0146 # Unit-tests and CLI tools
0147
0148 add_subdirectory(advancedrename)
0149 add_subdirectory(autotagassignment)
0150 add_subdirectory(albummodel) # Unit-test based on ModelTest
0151 add_subdirectory(database) # Some unit-tests based on ModelTest
0152 add_subdirectory(dimg)
0153 add_subdirectory(dngwriter)
0154 add_subdirectory(dplugins)
0155 add_subdirectory(facesengine)
0156 add_subdirectory(fileio)
0157 add_subdirectory(filters)
0158 add_subdirectory(imgqsort)
0159 add_subdirectory(iojobs)
0160 add_subdirectory(mediaserver)
0161 add_subdirectory(mjpegstream)
0162 add_subdirectory(mediawiki)
0163 add_subdirectory(metadataengine)
0164 add_subdirectory(miscs)
0165 add_subdirectory(multithreading)
0166 add_subdirectory(ocrtextconverter)
0167 add_subdirectory(rawengine)
0168 add_subdirectory(timestampupdate)
0169 add_subdirectory(webservices)
0170 add_subdirectory(widgets)
0171 add_subdirectory(video)
0172
0173 if(ENABLE_GEOLOCATION)
0174 add_subdirectory(geolocation) # Some unit-tests based on ModelTest
0175 endif()
0176
0177 if(FLEX_FOUND AND BISON_FOUND AND KF${QT_VERSION_MAJOR}ThreadWeaver_FOUND)
0178 add_subdirectory(panorama)
0179 endif()