2015-08-13 06:44:06 +08:00
|
|
|
set(pcmanfm_SRCS
|
|
|
|
application.cpp
|
|
|
|
pcmanfm.cpp
|
|
|
|
mainwindow.cpp
|
|
|
|
tabpage.cpp
|
|
|
|
tabbar.cpp
|
2017-10-22 00:55:23 +02:00
|
|
|
statusbar.cpp
|
2015-08-13 06:44:06 +08:00
|
|
|
view.cpp
|
|
|
|
launcher.cpp
|
|
|
|
preferencesdialog.cpp
|
2015-08-16 05:54:46 +08:00
|
|
|
xdgdir.cpp
|
2015-08-13 06:44:06 +08:00
|
|
|
desktoppreferencesdialog.cpp
|
|
|
|
desktopwindow.cpp
|
|
|
|
autorundialog.cpp
|
2016-12-22 01:50:16 +01:00
|
|
|
connectserverdialog.cpp
|
2015-08-13 06:44:06 +08:00
|
|
|
settings.cpp
|
2018-05-22 03:31:47 +02:00
|
|
|
bulkrename.cpp
|
2015-08-13 06:44:06 +08:00
|
|
|
)
|
|
|
|
|
2018-05-22 03:31:47 +02:00
|
|
|
qt5_add_dbus_adaptor(pcmanfm_DBUS_SRCS
|
2015-08-13 06:44:06 +08:00
|
|
|
org.pcmanfm.Application.xml
|
|
|
|
application.h
|
|
|
|
PCManFM::Application
|
|
|
|
applicationadaptor
|
|
|
|
ApplicationAdaptor
|
|
|
|
)
|
|
|
|
|
2018-05-22 03:31:47 +02:00
|
|
|
# qt5_add_dbus_adaptor() already generated the moc files. It also marked the
|
|
|
|
# files with SKIP_AUTOMOC but we still need to mark them witk SKIP_AUTOGEN.
|
|
|
|
# TODO: Check if this behaviour is a CMake bug.
|
|
|
|
set_source_files_properties(${pcmanfm_DBUS_SRCS} PROPERTIES SKIP_AUTOGEN ON)
|
|
|
|
|
2015-08-13 06:44:06 +08:00
|
|
|
set(pcmanfm_UIS
|
|
|
|
main-win.ui
|
|
|
|
about.ui
|
|
|
|
preferences.ui
|
|
|
|
desktop-preferences.ui
|
2015-10-31 11:37:23 +01:00
|
|
|
desktop-folder.ui
|
2015-08-13 06:44:06 +08:00
|
|
|
autorun.ui
|
2016-12-22 01:50:16 +01:00
|
|
|
connect.ui
|
2018-05-22 03:31:47 +02:00
|
|
|
bulk-rename.ui
|
2015-08-13 06:44:06 +08:00
|
|
|
)
|
|
|
|
|
2015-08-16 05:54:46 +08:00
|
|
|
# add translation for pcmanfm-qt
|
|
|
|
lxqt_translate_ts(QM_FILES
|
|
|
|
UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
|
2015-12-17 09:11:25 +08:00
|
|
|
SOURCES ${pcmanfm_SRCS} ${pcmanfm_UIS}
|
2016-07-21 00:17:52 +02:00
|
|
|
INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/translations"
|
2015-08-16 05:54:46 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# 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
|
|
|
|
)
|
|
|
|
|
2015-08-13 06:44:06 +08:00
|
|
|
add_executable(pcmanfm-qt
|
|
|
|
${pcmanfm_SRCS}
|
2018-05-22 03:31:47 +02:00
|
|
|
${pcmanfm_DBUS_SRCS}
|
|
|
|
${pcmanfm_UIS}
|
2015-08-16 05:54:46 +08:00
|
|
|
${QM_FILES}
|
|
|
|
${DESKTOP_FILES}
|
2015-08-13 06:44:06 +08:00
|
|
|
)
|
2016-12-22 01:50:16 +01:00
|
|
|
|
|
|
|
target_compile_definitions(pcmanfm-qt
|
|
|
|
PRIVATE
|
|
|
|
PCMANFM_DATA_DIR="${CMAKE_INSTALL_PREFIX}/share/pcmanfm-qt"
|
|
|
|
PCMANFM_QT_VERSION="${PCMANFM_QT_VERSION}"
|
|
|
|
LIBFM_DATA_DIR="${PKG_FM_PREFIX}/share/libfm"
|
2015-08-13 06:44:06 +08:00
|
|
|
)
|
|
|
|
|
2015-12-17 09:11:25 +08:00
|
|
|
target_include_directories(pcmanfm-qt
|
2016-12-22 01:50:16 +01:00
|
|
|
PRIVATE
|
|
|
|
"${Qt5Gui_PRIVATE_INCLUDE_DIRS}"
|
2015-12-17 09:11:25 +08:00
|
|
|
)
|
|
|
|
|
2015-08-13 06:44:06 +08:00
|
|
|
target_link_libraries(pcmanfm-qt
|
2015-12-17 09:11:25 +08:00
|
|
|
Qt5::X11Extras
|
|
|
|
Qt5::Widgets
|
|
|
|
Qt5::DBus
|
|
|
|
fm-qt
|
2015-08-13 06:44:06 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
install(TARGETS pcmanfm-qt RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
|
|
|
|
|
|
# install a desktop entry file for pcmanfm-qt and desktop preferences
|
2015-08-16 05:54:46 +08:00
|
|
|
install(FILES ${DESKTOP_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/applications"
|
2015-08-13 06:44:06 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# prevent the generated files from being deleted during make clean
|
|
|
|
set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM true)
|