Warning, /multimedia/juk/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
0002 
0003 # KDE Application Version, managed by KDE release team automatically
0004 # https://community.kde.org/Guidelines_and_HOWTOs/Application_Versioning
0005 set (RELEASE_SERVICE_VERSION_MAJOR "22")
0006 set (RELEASE_SERVICE_VERSION_MINOR "11")
0007 set (RELEASE_SERVICE_VERSION_MICRO "70")
0008 set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
0009 
0010 project(juk VERSION ${RELEASE_SERVICE_VERSION})
0011 
0012 set(QT_MIN_VERSION "5.15.2")
0013 set(KF5_MIN_VERSION "5.90.0")
0014 set(KDE_COMPILERSETTINGS_LEVEL "5.84.0")
0015 
0016 find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
0017 set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${ECM_MODULE_PATH})
0018 
0019 include(CMakePushCheckState)
0020 include(CheckIncludeFileCXX)
0021 include(KDEInstallDirs)
0022 include(KDECompilerSettings NO_POLICY_SCOPE)
0023 include(KDECMakeSettings NO_POLICY_SCOPE)
0024 include(FeatureSummary)
0025 include(ECMInstallIcons)
0026 include(ECMAddAppIcon)
0027 include(ECMQtDeclareLoggingCategory)
0028 
0029 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS Concurrent Gui Svg Network Test Widgets)
0030 find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
0031     CoreAddons
0032     Completion
0033     Config
0034     Crash
0035     GlobalAccel
0036     I18n
0037     IconThemes
0038     DBusAddons
0039     DocTools
0040     KIO
0041     JobWidgets
0042     Notifications
0043     TextWidgets
0044     XmlGui
0045     Wallet
0046     WidgetsAddons
0047     WindowSystem
0048 )
0049 find_package(Phonon4Qt${QT_MAJOR_VERSION} 4.6.60 REQUIRED NO_MODULE)
0050 
0051 find_package(Taglib 1.6 REQUIRED)
0052 
0053 include_directories(${CMAKE_BINARY_DIR} ${PHONON_INCLUDES})
0054 
0055 add_subdirectory( doc )
0056 add_subdirectory( tests )
0057 add_subdirectory( pics )
0058 
0059 #set_package_properties(FEATURE PROPERTIES DESCRIPTION "A library for developing MusicBrainz enabled tagging applications" URL "https://wiki.musicbrainz.org/History:libtunepimp" TYPE OPTIONAL PURPOSE "Provides MusicBrainz tagging in Juk.")
0060 
0061 # TODO: tunepimp is fully unsupported, replace this when tunepimp is replaced
0062 # with whatever is actually current this decade.
0063 set(HAVE_TUNEPIMP 0)
0064 
0065 ########### next target ###############
0066 
0067 add_definitions(-DQT_STL -DQT_NO_URL_CAST_FROM_STRING)
0068 
0069 configure_file (config-juk.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-juk.h )
0070 
0071 set(juk_SRCS
0072    advancedsearchdialog.cpp
0073    slider.cpp
0074    svghandler.cpp
0075    volumepopupbutton.cpp
0076    actioncollection.cpp
0077    cache.cpp
0078    categoryreaderinterface.cpp
0079    collectionlist.cpp
0080    coverdialog.cpp
0081    covericonview.cpp
0082    coverinfo.cpp
0083    covermanager.cpp
0084    coverproxy.cpp
0085    dbuscollectionproxy.cpp
0086    deletedialog.cpp
0087    directorylist.cpp
0088    directoryloader.cpp
0089    dynamicplaylist.cpp
0090    exampleoptions.cpp
0091    folderplaylist.cpp
0092    filehandle.cpp
0093    filerenamer.cpp
0094    filerenameroptions.cpp
0095    filerenamerconfigdlg.cpp
0096    webimagefetcher.cpp
0097    historyplaylist.cpp
0098    iconsupport.cpp
0099    juk.cpp
0100    juktag.cpp
0101    keydialog.cpp
0102    lyricswidget.cpp
0103    main.cpp
0104    mediafiles.cpp
0105    mpris2/mediaplayer2.cpp
0106    mpris2/mediaplayer2player.cpp
0107    mpris2/mpris2.cpp
0108    nowplaying.cpp
0109    playermanager.cpp
0110    playlist.cpp
0111    playlistbox.cpp
0112    playlistcollection.cpp
0113    playlistinterface.cpp
0114    playlistitem.cpp
0115    playlistsearch.cpp
0116    playlistsharedsettings.cpp
0117    playlistsplitter.cpp
0118    scrobbler.cpp
0119    scrobbleconfigdlg.cpp
0120    searchplaylist.cpp
0121    searchwidget.cpp
0122    slideraction.cpp
0123    statuslabel.cpp
0124    stringshare.cpp
0125    systemtray.cpp
0126    tageditor.cpp
0127    tagguesser.cpp
0128    tagguesserconfigdlg.cpp
0129    tagrenameroptions.cpp
0130    tagtransactionmanager.cpp
0131    treeviewitemplaylist.cpp
0132    upcomingplaylist.cpp
0133    viewmode.cpp )
0134 
0135 ecm_qt_declare_logging_category(juk_SRCS HEADER juk_debug.h
0136                                 IDENTIFIER JUK_LOG CATEGORY_NAME org.kde.juk)
0137 
0138 qt_add_dbus_adaptor( juk_SRCS org.kde.juk.collection.xml
0139     dbuscollectionproxy.h DBusCollectionProxy )
0140 qt_add_dbus_adaptor( juk_SRCS org.kde.juk.player.xml playermanager.h PlayerManager)
0141 qt_add_dbus_adaptor( juk_SRCS org.kde.juk.search.xml searchwidget.h SearchWidget)
0142 
0143 
0144 ki18n_wrap_ui(juk_SRCS
0145     filerenamerbase.ui
0146     filerenameroptionsbase.ui
0147     directorylistbase.ui
0148     tagguesserconfigdlgwidget.ui
0149     exampleoptionsbase.ui
0150     coverdialogbase.ui
0151     deletedialogbase.ui
0152     tageditor.ui
0153 )
0154 
0155 file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/*-apps-juk.png")
0156 ecm_add_app_icon(juk_SRCS ICONS ${ICONS_SRCS})
0157 add_executable(juk ${juk_SRCS})
0158 
0159 kde_target_enable_exceptions(juk PRIVATE)
0160 target_compile_definitions(juk PRIVATE QT_USE_QSTRINGBUILDER)
0161 set_target_properties(juk PROPERTIES
0162     CXX_STANDARD 14
0163     CXX_STANDARD_REQUIRED ON
0164     )
0165 
0166 if(NOT MSVC AND NOT ( WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel" ) )
0167     set( LIBMATH m )
0168 endif()
0169 
0170 target_link_libraries(juk ${LIBMATH}
0171     Qt::Concurrent
0172     Qt::Gui
0173     Qt::Svg
0174     Qt::Widgets
0175     Qt::Network
0176     KF5::ConfigCore
0177     KF5::CoreAddons
0178     KF5::Completion
0179     KF5::Crash
0180     KF5::DBusAddons
0181     KF5::GlobalAccel
0182     KF5::KIOCore
0183     KF5::KIOWidgets
0184     KF5::KIOFileWidgets
0185     KF5::JobWidgets
0186     KF5::Notifications
0187     KF5::I18n
0188     KF5::IconThemes
0189     KF5::TextWidgets
0190     KF5::XmlGui
0191     KF5::WindowSystem
0192     KF5::WidgetsAddons
0193     KF5::Wallet
0194     Phonon::phonon4qt${QT_MAJOR_VERSION}
0195     Taglib::Taglib
0196 )
0197 
0198 if(TUNEPIMP_FOUND)
0199     target_link_libraries(juk ${TUNEPIMP_LIBRARIES})
0200 endif(TUNEPIMP_FOUND)
0201 
0202 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
0203 
0204 install(TARGETS juk  ${INSTALL_TARGETS_DEFAULT_ARGS} )
0205 
0206 ########### install files ###############
0207 
0208 install( PROGRAMS org.kde.juk.desktop  DESTINATION  ${KDE_INSTALL_APPDIR} )
0209 install( FILES jukui.rc jukui-rtl.rc  DESTINATION  ${KXMLGUI_INSTALL_DIR}/juk )
0210 install(
0211     FILES juk.notifyrc
0212     DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR}
0213 )
0214 
0215 install( FILES org.kde.juk.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} )
0216 install( PROGRAMS jukservicemenu.desktop  DESTINATION ${KDE_INSTALL_DATADIR}/kio/servicemenus )
0217 install( FILES org.kde.juk.collection.xml org.kde.juk.player.xml org.kde.juk.search.xml DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR} )
0218 
0219 ki18n_install(po)
0220 kdoctools_install(po)
0221 
0222 ecm_install_icons(ICONS
0223     128-apps-juk.png
0224     16-apps-juk.png
0225     32-apps-juk.png
0226     48-apps-juk.png
0227     64-apps-juk.png
0228     DESTINATION ${KDE_INSTALL_ICONDIR}
0229     THEME hicolor
0230 )