Warning, /graphics/digikam/core/showfoto/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 # To fill MacOS and Windows bundles metadata 0011 0012 set(BUNDLE_APP_NAME_STRING "showfoto") 0013 set(BUNDLE_APP_DESCRIPTION_STRING "Stand alone Photo Editor based on digiKam Image Editor") 0014 set(BUNDLE_LEGAL_COPYRIGHT_STRING "GNU Public License V2") 0015 set(BUNDLE_COMMENT_STRING "Free and open source software to edit photo") 0016 set(BUNDLE_LONG_VERSION_STRING ${DIGIKAM_VERSION_STRING}) 0017 set(BUNDLE_SHORT_VERSION_STRING ${DIGIKAM_VERSION_SHORT}) 0018 set(BUNDLE_VERSION_STRING ${DIGIKAM_VERSION_STRING}) 0019 0020 # Showfoto executable 0021 0022 set(showfoto_SRCS 0023 ${CMAKE_CURRENT_SOURCE_DIR}/setup/showfotosetuptooltip.cpp 0024 ${CMAKE_CURRENT_SOURCE_DIR}/setup/showfotosetupmisc.cpp 0025 ${CMAKE_CURRENT_SOURCE_DIR}/setup/showfotosetupmetadata.cpp 0026 ${CMAKE_CURRENT_SOURCE_DIR}/setup/showfotosetupraw.cpp 0027 ${CMAKE_CURRENT_SOURCE_DIR}/setup/showfotosetupplugins.cpp 0028 ${CMAKE_CURRENT_SOURCE_DIR}/setup/showfotosetup.cpp 0029 0030 ${CMAKE_CURRENT_SOURCE_DIR}/thumbbar/showfotoiteminfo.cpp 0031 ${CMAKE_CURRENT_SOURCE_DIR}/thumbbar/showfotoitemmodel.cpp 0032 ${CMAKE_CURRENT_SOURCE_DIR}/thumbbar/showfotothumbnailmodel.cpp 0033 ${CMAKE_CURRENT_SOURCE_DIR}/thumbbar/showfotofiltermodel.cpp 0034 ${CMAKE_CURRENT_SOURCE_DIR}/thumbbar/showfotodragdrophandler.cpp 0035 ${CMAKE_CURRENT_SOURCE_DIR}/thumbbar/showfotokineticscroller.cpp 0036 ${CMAKE_CURRENT_SOURCE_DIR}/thumbbar/showfotoitemsortsettings.cpp 0037 ${CMAKE_CURRENT_SOURCE_DIR}/thumbbar/showfotocoordinatesoverlay.cpp 0038 ${CMAKE_CURRENT_SOURCE_DIR}/thumbbar/showfotoitemviewdelegate.cpp 0039 ${CMAKE_CURRENT_SOURCE_DIR}/thumbbar/showfotodelegate.cpp 0040 ${CMAKE_CURRENT_SOURCE_DIR}/thumbbar/showfototooltipfiller.cpp 0041 ${CMAKE_CURRENT_SOURCE_DIR}/thumbbar/showfotocategorizedview.cpp 0042 ${CMAKE_CURRENT_SOURCE_DIR}/thumbbar/showfotothumbnailbar.cpp 0043 0044 ${CMAKE_CURRENT_SOURCE_DIR}/folderview/showfotofolderviewsidebar.cpp 0045 ${CMAKE_CURRENT_SOURCE_DIR}/folderview/showfotofolderviewlist.cpp 0046 ${CMAKE_CURRENT_SOURCE_DIR}/folderview/showfotofolderviewmodel.cpp 0047 ${CMAKE_CURRENT_SOURCE_DIR}/folderview/showfotofolderviewbar.cpp 0048 ${CMAKE_CURRENT_SOURCE_DIR}/folderview/showfotofolderviewundo.cpp 0049 ${CMAKE_CURRENT_SOURCE_DIR}/folderview/showfotofolderviewtooltip.cpp 0050 ${CMAKE_CURRENT_SOURCE_DIR}/folderview/showfotofolderviewbookmarks.cpp 0051 ${CMAKE_CURRENT_SOURCE_DIR}/folderview/showfotofolderviewbookmarkdlg.cpp 0052 ${CMAKE_CURRENT_SOURCE_DIR}/folderview/showfotofolderviewbookmarklist.cpp 0053 ${CMAKE_CURRENT_SOURCE_DIR}/folderview/showfotofolderviewbookmarkitem.cpp 0054 0055 ${CMAKE_CURRENT_SOURCE_DIR}/stackview/showfotostackviewsidebar.cpp 0056 ${CMAKE_CURRENT_SOURCE_DIR}/stackview/showfotostackviewlist.cpp 0057 ${CMAKE_CURRENT_SOURCE_DIR}/stackview/showfotostackviewitem.cpp 0058 ${CMAKE_CURRENT_SOURCE_DIR}/stackview/showfotostackviewtooltip.cpp 0059 ${CMAKE_CURRENT_SOURCE_DIR}/stackview/showfotostackviewfavorites.cpp 0060 ${CMAKE_CURRENT_SOURCE_DIR}/stackview/showfotostackviewfavoriteitemdlg.cpp 0061 ${CMAKE_CURRENT_SOURCE_DIR}/stackview/showfotostackviewfavoritelist.cpp 0062 ${CMAKE_CURRENT_SOURCE_DIR}/stackview/showfotostackviewfavoriteitem.cpp 0063 0064 ${CMAKE_CURRENT_SOURCE_DIR}/main/showfotosettings.cpp 0065 ${CMAKE_CURRENT_SOURCE_DIR}/main/showfotoinfoiface.cpp 0066 ${CMAKE_CURRENT_SOURCE_DIR}/main/showfoto.cpp 0067 ${CMAKE_CURRENT_SOURCE_DIR}/main/showfoto_open.cpp 0068 ${CMAKE_CURRENT_SOURCE_DIR}/main/showfoto_iofiles.cpp 0069 ${CMAKE_CURRENT_SOURCE_DIR}/main/showfoto_setup.cpp 0070 ${CMAKE_CURRENT_SOURCE_DIR}/main/showfoto_config.cpp 0071 ${CMAKE_CURRENT_SOURCE_DIR}/main/showfoto_import.cpp 0072 ${CMAKE_CURRENT_SOURCE_DIR}/main/showfoto_thumbbar.cpp 0073 ${CMAKE_CURRENT_SOURCE_DIR}/main/main.cpp 0074 ) 0075 0076 # Set the application icon on the application 0077 0078 file(GLOB ICONS_SRCS "${CMAKE_SOURCE_DIR}/core/data/icons/apps/*-apps-showfoto.png") 0079 0080 if(WIN32) 0081 0082 # Build the main implementation into a DLL to be called by a stub EXE. 0083 # This is a work around "command line is too long" issue on Windows. 0084 # see https://stackoverflow.com/questions/43184251/cmake-command-line-too-long-windows 0085 0086 add_library(showfoto SHARED ${showfoto_SRCS}) 0087 set_target_properties(showfoto PROPERTIES PREFIX "") 0088 0089 elseif(APPLE) 0090 0091 ecm_add_app_icon(showfoto_SRCS ICONS ${ICONS_SRCS}) 0092 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/templates/ShowfotoInfo.plist.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) 0093 add_executable(showfoto ${showfoto_SRCS}) 0094 set_target_properties(showfoto PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) 0095 0096 else() 0097 0098 ecm_add_app_icon(showfoto_SRCS ICONS ${ICONS_SRCS}) 0099 add_executable(showfoto ${showfoto_SRCS}) 0100 0101 endif() 0102 0103 HEADER_DIRECTORIES(${CMAKE_SOURCE_DIR}/core/utilities DK_LOCAL_INCLUDES_UTILS) 0104 0105 target_include_directories(showfoto 0106 0107 # We need to include the setup dir for showfoto BEFORE the other include dirs, 0108 # otherwise the one from the "utilities" dir will be used 0109 0110 BEFORE 0111 PRIVATE 0112 0113 ${CMAKE_CURRENT_SOURCE_DIR}/folderview 0114 ${CMAKE_CURRENT_SOURCE_DIR}/stackview 0115 ${CMAKE_CURRENT_SOURCE_DIR}/thumbbar 0116 ${CMAKE_CURRENT_SOURCE_DIR}/setup 0117 ${CMAKE_CURRENT_SOURCE_DIR}/main 0118 ) 0119 0120 target_include_directories(showfoto 0121 0122 AFTER 0123 PRIVATE 0124 0125 $<TARGET_PROPERTY:Qt${QT_VERSION_MAJOR}::Network,INTERFACE_INCLUDE_DIRECTORIES> 0126 0127 ${CMAKE_SOURCE_DIR}/core/app/dragdrop 0128 ${CMAKE_SOURCE_DIR}/core/app/items/overlays 0129 ${CMAKE_SOURCE_DIR}/core/app/views/sidebar 0130 0131 ${DK_LOCAL_INCLUDES} 0132 ${DK_LOCAL_INCLUDES_UTILS} 0133 ) 0134 0135 if(KF${QT_VERSION_MAJOR}IconThemes_FOUND) 0136 0137 target_include_directories(showfoto 0138 AFTER 0139 PRIVATE 0140 $<TARGET_PROPERTY:KF${QT_VERSION_MAJOR}::IconThemes,INTERFACE_INCLUDE_DIRECTORIES> 0141 ) 0142 0143 if (Qt6_FOUND) 0144 0145 target_include_directories(showfoto 0146 AFTER 0147 PRIVATE 0148 $<TARGET_PROPERTY:KF${QT_VERSION_MAJOR}::IconWidgets,INTERFACE_INCLUDE_DIRECTORIES> 0149 ) 0150 0151 endif() 0152 0153 endif() 0154 0155 add_dependencies(showfoto digikam-gitversion) 0156 add_dependencies(showfoto digikam-builddate) 0157 0158 target_link_libraries(showfoto 0159 0160 PUBLIC 0161 0162 Qt${QT_VERSION_MAJOR}::Core 0163 Qt${QT_VERSION_MAJOR}::Gui 0164 Qt${QT_VERSION_MAJOR}::Xml 0165 Qt${QT_VERSION_MAJOR}::Widgets 0166 0167 KF${QT_VERSION_MAJOR}::XmlGui 0168 KF${QT_VERSION_MAJOR}::I18n 0169 KF${QT_VERSION_MAJOR}::ConfigCore 0170 KF${QT_VERSION_MAJOR}::Service 0171 KF${QT_VERSION_MAJOR}::CoreAddons 0172 0173 digikamcore 0174 ) 0175 0176 if(KF${QT_VERSION_MAJOR}Notifications_FOUND) 0177 0178 target_link_libraries(showfoto 0179 PUBLIC 0180 KF${QT_VERSION_MAJOR}::Notifications 0181 ) 0182 0183 endif() 0184 0185 if(KF${QT_VERSION_MAJOR}NotifyConfig_FOUND) 0186 0187 target_link_libraries(showfoto 0188 PUBLIC 0189 KF${QT_VERSION_MAJOR}::NotifyConfig 0190 ) 0191 0192 endif() 0193 0194 if(KF${QT_VERSION_MAJOR}IconThemes_FOUND) 0195 0196 target_link_libraries(showfoto 0197 PUBLIC 0198 KF${QT_VERSION_MAJOR}::IconThemes 0199 ) 0200 0201 if (Qt6_FOUND) 0202 0203 target_link_libraries(showfoto 0204 PUBLIC 0205 KF${QT_VERSION_MAJOR}::IconWidgets 0206 ) 0207 0208 endif() 0209 0210 endif() 0211 0212 if(ImageMagick_Magick++_FOUND) 0213 0214 target_link_libraries(showfoto 0215 PUBLIC 0216 ${ImageMagick_LIBRARIES} 0217 ) 0218 0219 endif() 0220 0221 if(NOT WIN32) 0222 0223 # To link under Solaris (see bug #274484) 0224 target_link_libraries(showfoto 0225 PUBLIC 0226 ${MATH_LIBRARY} 0227 ) 0228 0229 endif() 0230 0231 if(CMAKE_SYSTEM_NAME STREQUAL FreeBSD) 0232 0233 target_link_libraries(showfoto 0234 PUBLIC 0235 ${KVM_LIBRARY} 0236 ) 0237 0238 endif() 0239 0240 if(APPLE) 0241 0242 target_link_libraries(showfoto 0243 PUBLIC 0244 /System/Library/Frameworks/AppKit.framework 0245 ) 0246 0247 endif() 0248 0249 if(Qt6_FOUND) 0250 install(TARGETS showfoto DESTINATION ${KDE_INSTALL_BINDIR}) 0251 else() 0252 install(TARGETS showfoto ${INSTALL_TARGETS_DEFAULT_ARGS}) 0253 endif() 0254 0255 install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/main/org.kde.showfoto.desktop DESTINATION ${KDE_INSTALL_FULL_APPDIR}) 0256 install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/main/org.kde.showfoto.appdata.xml DESTINATION ${KDE_INSTALL_FULL_METAINFODIR}) 0257 install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/main/showfotoui5.rc DESTINATION ${KDE_INSTALL_FULL_KXMLGUIDIR}/showfoto) 0258 0259 if(APPLE) 0260 install(FILES "$<TARGET_FILE:showfoto>.dSYM" DESTINATION "${CMAKE_INSTALL_BINDIR}" CONFIGURATIONS Debug RelWithDebInfo) 0261 endif() 0262 0263 if(WIN32) 0264 0265 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/templates/versioninfo.rc.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/versioninfo.rc) 0266 0267 set(showfoto_windows_stub_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/main/windows_stub_main.cpp) 0268 0269 ecm_add_app_icon(showfoto_windows_stub_SRCS ICONS ${ICONS_SRCS}) 0270 0271 add_executable(showfoto_windows_stub_exe 0272 ${showfoto_windows_stub_SRCS} 0273 ${CMAKE_CURRENT_BINARY_DIR}/versioninfo.rc 0274 ) 0275 0276 target_link_libraries(showfoto_windows_stub_exe 0277 PRIVATE 0278 showfoto) 0279 0280 if(NOT Qt6_FOUND) 0281 0282 target_link_libraries(showfoto_windows_stub_exe 0283 PRIVATE 0284 Qt${QT_VERSION_MAJOR}::WinMain) 0285 0286 endif() 0287 0288 set_target_properties(showfoto_windows_stub_exe PROPERTIES OUTPUT_NAME "showfoto") 0289 target_include_directories(showfoto_windows_stub_exe PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/main) 0290 0291 install(TARGETS showfoto_windows_stub_exe ${INSTALL_TARGETS_DEFAULT_ARGS}) 0292 0293 endif()