Changeset View
Changeset View
Standalone View
Standalone View
kcms/phonon/CMakeLists.txt
1 | find_package(Phonon4Qt5 4.6.60 NO_MODULE) | 1 | find_package(Phonon4Qt5 4.6.60 NO_MODULE) | ||
---|---|---|---|---|---|
2 | include_directories(BEFORE ${PHONON_INCLUDES}) | 2 | include_directories(BEFORE ${PHONON_INCLUDES}) | ||
3 | add_definitions(-DPHONON_LIB_SONAME=\"${PHONON_LIB_SONAME}\") | 3 | add_definitions(-DPHONON_LIB_SONAME=\"${PHONON_LIB_SONAME}\") | ||
4 | # KI18N Translation Domain for this library | 4 | # KI18N Translation Domain for this library | ||
5 | add_definitions(-DTRANSLATION_DOMAIN=\"kcm5_phonon\") | 5 | add_definitions(-DTRANSLATION_DOMAIN=\"kcm5_phonon\") | ||
6 | 6 | | |||
7 | | ||||
8 | find_package(PulseAudio 0.9.16) | | |||
9 | set_package_properties(PulseAudio PROPERTIES DESCRIPTION "PulseAudio Audio Server" | | |||
10 | URL "http://www.pulseaudio.org/" | | |||
11 | TYPE OPTIONAL | | |||
12 | PURPOSE "libpulse is needed for audio setup GUI" | | |||
13 | ) | | |||
14 | | ||||
15 | find_package(GLIB2) | | |||
16 | set_package_properties(GLIB2 PROPERTIES DESCRIPTION "Low-level core library for data structure handling, portability wrappers, etc." | | |||
17 | URL "http://www.gtk.org" | | |||
18 | TYPE OPTIONAL | | |||
19 | ) | | |||
20 | | ||||
21 | find_package(Canberra) | | |||
22 | set_package_properties(Canberra PROPERTIES DESCRIPTION "Audio setup GUI" | | |||
23 | PURPOSE "libcanberra is needed for audio setup GUI" | | |||
24 | URL "http://0pointer.de/lennart/projects/libcanberra" | | |||
25 | TYPE OPTIONAL | | |||
26 | ) | | |||
27 | | ||||
28 | set(kcmphonon_SRCS main.cpp devicepreference.cpp backendselection.cpp) | 7 | set(kcmphonon_SRCS main.cpp devicepreference.cpp backendselection.cpp) | ||
29 | ki18n_wrap_ui(kcmphonon_SRCS devicepreference.ui backendselection.ui) | 8 | ki18n_wrap_ui(kcmphonon_SRCS devicepreference.ui backendselection.ui) | ||
30 | set(kcmphonon_LIBS | 9 | set(kcmphonon_LIBS | ||
31 | KF5::ConfigWidgets | 10 | KF5::ConfigWidgets | ||
32 | KF5::I18n | 11 | KF5::I18n | ||
33 | KF5::IconThemes | 12 | KF5::IconThemes | ||
34 | KF5::KCMUtils | 13 | KF5::KCMUtils | ||
35 | KF5::KIOWidgets | 14 | KF5::KIOWidgets | ||
36 | ${PHONON_LIBRARY}) | 15 | ${PHONON_LIBRARY}) | ||
37 | 16 | | |||
38 | if(GLIB2_FOUND AND PULSEAUDIO_FOUND AND CANBERRA_FOUND) | | |||
39 | add_definitions(-DHAVE_PULSEAUDIO) | | |||
40 | | ||||
41 | set(kcmphonon_SRCS ${kcmphonon_SRCS} audiosetup.cpp testspeakerwidget.cpp) | | |||
42 | ki18n_wrap_ui(kcmphonon_SRCS audiosetup.ui) | | |||
43 | | ||||
44 | include_directories(${GLIB2_INCLUDE_DIR} ${PULSEAUDIO_INCLUDE_DIR} ${CANBERRA_INCLUDE_DIRS}) | | |||
45 | | ||||
46 | set(kcmphonon_LIBS ${kcmphonon_LIBS} ${GLIB2_LIBRARIES} ${PulseAudio_LIBRARIES} ${PulseAudio_MAINLOOP_LIBRARY} ${CANBERRA_LIBRARIES}) | | |||
47 | endif() | | |||
48 | | ||||
49 | ecm_qt_declare_logging_category(kcmphonon_SRCS HEADER phonon_debug.h IDENTIFIER KCM_PHONON_LOG CATEGORY_NAME org.kde.kcm.phonon) | 17 | ecm_qt_declare_logging_category(kcmphonon_SRCS HEADER phonon_debug.h IDENTIFIER KCM_PHONON_LOG CATEGORY_NAME org.kde.kcm.phonon) | ||
50 | 18 | | |||
51 | add_library(kcm_phonon MODULE ${kcmphonon_SRCS}) | 19 | add_library(kcm_phonon MODULE ${kcmphonon_SRCS}) | ||
52 | target_link_libraries(kcm_phonon ${kcmphonon_LIBS} KF5::ConfigWidgets) | 20 | target_link_libraries(kcm_phonon ${kcmphonon_LIBS} KF5::ConfigWidgets) | ||
53 | 21 | | |||
54 | install(TARGETS kcm_phonon DESTINATION ${KDE_INSTALL_PLUGINDIR} ) | 22 | install(TARGETS kcm_phonon DESTINATION ${KDE_INSTALL_PLUGINDIR} ) | ||
55 | 23 | | |||
56 | ########### install files ############### | 24 | ########### install files ############### | ||
57 | install( FILES kcm_phonon.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) | 25 | install( FILES kcm_phonon.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) | ||
58 | install(FILES listview-background.png DESTINATION ${KDE_INSTALL_DATADIR}/kcm_phonon) | 26 | install(FILES listview-background.png DESTINATION ${KDE_INSTALL_DATADIR}/kcm_phonon) |