pcmanfm-qt-packaging/pcmanfm/CMakeLists.txt
Alf Gaida 98bdec9473 Cherry-picking upstream release 0.11.1.
* Synced debian foo with experimental
* Removed --parallel from rules, standard compat 10
* New dep. default-dbus-session-bus | dbus-session-bus | dbus-x11
  (Closes: #836284)
* Fixed Crashes while copying (Closes: #823753)
* Bumped minimum version libfm-qt-dev (>= 0.11.1)
* Bumped minimum version libqt5xdg-dev (>= 2.0.0)
* Added build dependency libkf5windowsystem-dev
* Added build dependency libqt5svg5-dev
* Added build dependency liblxqt0-dev (>= 0.11.0)
* Added Recommends pcmanfm-qt-l10n
* Fixed VCS fields, using plain /git/
* Fixed copyright Format field, using https
* Dropped patches, applied upstream
* Added translation controls
* Set CMAKE_BUILD_TYPE=RelWithDebInfo
2016-10-18 22:59:50 +02:00

89 lines
2.1 KiB
CMake

set(pcmanfm_SRCS
application.cpp
pcmanfm.cpp
mainwindow.cpp
tabpage.cpp
tabbar.cpp
view.cpp
launcher.cpp
preferencesdialog.cpp
xdgdir.cpp
desktoppreferencesdialog.cpp
desktopwindow.cpp
desktopitemdelegate.cpp
autorundialog.cpp
settings.cpp
)
qt5_add_dbus_adaptor(pcmanfm_SRCS
org.pcmanfm.Application.xml
application.h
PCManFM::Application
applicationadaptor
ApplicationAdaptor
)
set(pcmanfm_UIS
main-win.ui
about.ui
preferences.ui
desktop-preferences.ui
desktop-folder.ui
autorun.ui
)
qt5_wrap_ui(pcmanfm_UIS_H ${pcmanfm_UIS})
# add translation for pcmanfm-qt
lxqt_translate_ts(QM_FILES
UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
SOURCES ${pcmanfm_SRCS} ${pcmanfm_UIS}
INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/translations"
PULL_TRANSLATIONS ${PULL_TRANSLATIONS}
CLEAN_TRANSLATIONS ${CLEAN_TRANSLATIONS}
TRANSLATIONS_REPO ${TRANSLATIONS_REPO}
TRANSLATIONS_REFSPEC ${TRANSLATIONS_REFSPEC}
)
# translate desktop entry files for pcmanfm-qt and desktop preferences
lxqt_translate_desktop(DESKTOP_FILES
SOURCES
pcmanfm-qt.desktop.in
pcmanfm-qt-desktop-pref.desktop.in
)
add_executable(pcmanfm-qt
${pcmanfm_SRCS}
${pcmanfm_UIS_H}
${QM_FILES}
${DESKTOP_FILES}
)
set_property(
TARGET pcmanfm-qt APPEND
PROPERTY COMPILE_DEFINITIONS
PCMANFM_DATA_DIR="${CMAKE_INSTALL_PREFIX}/share/pcmanfm-qt"
PCMANFM_QT_VERSION="${PCMANFM_QT_VERSION}"
)
target_include_directories(pcmanfm-qt
PRIVATE "${LIB_XCB_INDLUDE_DIRS}"
"${Qt5Gui_PRIVATE_INCLUDE_DIRS}"
)
target_link_libraries(pcmanfm-qt
Qt5::X11Extras
Qt5::Widgets
Qt5::DBus
fm-qt
"${LIB_XCB_LIBRARIES}"
)
install(TARGETS pcmanfm-qt RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
# install a desktop entry file for pcmanfm-qt and desktop preferences
install(FILES ${DESKTOP_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/applications"
)
# prevent the generated files from being deleted during make clean
set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM true)