diff --git a/CMakeLists.txt b/CMakeLists.txt index e286cd6a..7aeda62f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,132 +1,133 @@ project(krusader) cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) set (QT_MIN_VERSION "5.2.0") set(VERSION "2.5.1-beta" ) set(RELEASE_NAME "Clear Skies") # Manages plugin loading. For more details it can be seen https://www.kde.org/announcements/kde-frameworks-5.5.0.php # https://github.com/KDE/partitionmanager/blob/master/CMakeLists.txt http://commits.kde.org/kimtoy/1e62777affb0e072f3462e80bc271f3cba661104 set(KDE_INSTALL_USE_QT_SYS_PATHS ON CACHE BOOL "Install mkspecs files, Plugins and Imports to the Qt 5 install dir" FORCE) -find_package(ECM 1.1.0 REQUIRED NO_MODULE) +find_package(ECM 1.7.0 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) include(ECMOptionalAddSubdirectory) include(ECMInstallIcons) include(ECMSetupVersion) include(ECMMarkNonGuiExecutable) include(ECMGenerateHeaders) include(GenerateExportHeader) include(CMakePackageConfigHelpers) include(FeatureSummary) include(WriteBasicConfigVersionFile) include(CheckFunctionExists) include(CheckIncludeFiles) include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings NO_POLICY_SCOPE) +include(ECMAddAppIcon) find_package(Qt5 5.5 CONFIG REQUIRED Concurrent Core Gui DBus Widgets PrintSupport Xml ) # determine kf5 version is at least 5.23 message(STATUS "Searching for KF5KIO version 5.23 or newer...") find_package(KF5 5.23 QUIET COMPONENTS KIO ) if(KF5_FOUND) set(KRARC_QUERY_ENABLED TRUE) add_definitions( "-DKRARC_QUERY_ENABLED" ) else(KF5_FOUND) message(STATUS "KF5KIO version 5.23 or newer not found, some krarc:/ functionality will be disabled.") set(KRARC_QUERY_ENABLED FALSE) endif(KF5_FOUND) find_package(KF5 REQUIRED COMPONENTS Archive Bookmarks Codecs Completion CoreAddons Config DocTools I18n IconThemes ItemViews KIO Notifications Parts Solid TextWidgets Wallet WidgetsAddons WindowSystem XmlGui GuiAddons ) # Synchronizer is enabled by default, unless disabled from the command line (-DENABLE_SYNCHRONIZER=OFF) option(ENABLE_SYNCHRONIZER "Enable Synchronizer" ON) # if an old setting is being used, use the setting that complies with the structure of other Krusader settings if(ENABLE_SYNCHRONIZER) set(SYNCHRONIZER_ENABLED TRUE) add_definitions( "-DSYNCHRONIZER_ENABLED" ) else() set(SYNCHRONIZER_ENABLED FALSE) endif() # For security reasons, absolute kdesu path is set at build time and is not # configurable. if(NOT KDESU_PATH) set(KDESU_PATH "${KDE_INSTALL_FULL_LIBEXECDIR_KF5}/kdesu") endif() add_definitions( -DKDESU_PATH="${KDESU_PATH}" ) add_definitions(${QT_DEFINITIONS} ${KF5_DEFINITIONS}) add_definitions( "-DKRARC_ENABLED" ) add_definitions( "-DQT_NO_URL_CAST_FROM_STRING" ) check_include_files(attr/libattr.h HAVE_ATTR_LIBATTR_H) check_include_files(sys/xattr.h HAVE_SYS_XATTR_H) check_include_files(sys/acl.h HAVE_SYS_ACL_H) check_include_files(acl/libacl.h HAVE_ACL_LIBACL_H) if (HAVE_ATTR_LIBATTR_H AND HAVE_SYS_XATTR_H AND HAVE_SYS_ACL_H AND HAVE_ACL_LIBACL_H) set(ACL_HEADERS_FOUND TRUE) endif(HAVE_ATTR_LIBATTR_H AND HAVE_SYS_XATTR_H AND HAVE_SYS_ACL_H AND HAVE_ACL_LIBACL_H) if (ACL_HEADERS_FOUND) find_library(ACL_LIBS NAMES acl ) find_library(ATTR_LIBS NAMES attr ) endif(ACL_HEADERS_FOUND) if (ACL_HEADERS_FOUND AND ACL_LIBS AND ATTR_LIBS) set(ACL_FOUND TRUE) set(ACL_LIBS ${ACL_LIBS} ${ATTR_LIBS}) message(STATUS "Found ACL support: ${ACL_LIBS}") add_definitions(-DHAVE_POSIX_ACL) endif(ACL_HEADERS_FOUND AND ACL_LIBS AND ATTR_LIBS) #include(ConfigureChecks.cmake) add_subdirectory(krusader) add_subdirectory(pics) add_subdirectory(doc-extras) add_subdirectory(krArc) add_subdirectory(iso) add_subdirectory(doc) #add_subdirectory(virt) - not used feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/krusader/CMakeLists.txt b/krusader/CMakeLists.txt index 6d79b725..68ef870a 100644 --- a/krusader/CMakeLists.txt +++ b/krusader/CMakeLists.txt @@ -1,131 +1,131 @@ include_directories(${KF5_INCLUDES_DIRS} ${QT_INCLUDES}) configure_file(krusaderversion.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/krusaderversion.h) add_subdirectory(ActionMan) add_subdirectory(Archive) add_subdirectory(BookMan) add_subdirectory(Dialogs) add_subdirectory(DiskUsage) add_subdirectory(FileSystem) add_subdirectory(Filter) add_subdirectory(GUI) add_subdirectory(Konfigurator) add_subdirectory(KViewer) add_subdirectory(JobMan) add_subdirectory(Locate) add_subdirectory(MountMan) add_subdirectory(Panel) add_subdirectory(Search) add_subdirectory(Splitter) add_subdirectory(UserAction) if(SYNCHRONIZER_ENABLED) add_subdirectory(Synchronizer) endif(SYNCHRONIZER_ENABLED) message(STATUS "${CMAKE_CURRENT_SOURCE_DIR}: skipped subdir $(KRJSDIR)") set(krusader_SRCS krglobal.cpp actionsbase.cpp tabactions.cpp kractions.cpp paneltabbar.cpp panelmanager.cpp krservices.cpp main.cpp krusaderview.cpp krusader.cpp krslots.cpp kicons.cpp krdebuglogger.cpp ) -# TODO porting: missing kf5 equivalent -#kde4_add_app_icon(krusader_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/hi*-app-krusader_user.png") +file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/*-apps-krusader_user.png") +ecm_add_app_icon(krusader_SRCS ICONS ${ICONS_SRCS}) qt5_add_resources(krusader_RC_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/resources.qrc" ) add_executable(krusader ${krusader_SRCS} ${krusader_RC_SRCS}) target_link_libraries(krusader Panel BookMan Dialogs DiskUsage GUI Konfigurator KViewer MountMan FileSystem Search Splitter Locate UserAction ActionMan KViewer Filter Dialogs GUI Archive JobMan KF5::Notifications KF5::Parts KF5::WindowSystem Qt5::PrintSupport Qt5::Concurrent ) if(SYNCHRONIZER_ENABLED) target_link_libraries( krusader Synchronizer ) endif(SYNCHRONIZER_ENABLED) install(TARGETS krusader ${INSTALL_TARGETS_DEFAULT_ARGS}) install(PROGRAMS org.kde.krusader.desktop org.kde.krusader.root-mode.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) install(FILES krusaderui.rc krusaderlisterui.rc krviewer.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/krusader) install(FILES midnight_commander.color total_commander.color total_commander.keymap total_commander.keymap.info useraction_examples.xml layout.xml splash.png DESTINATION ${DATA_INSTALL_DIR}/krusader) install(FILES org.kde.krusader.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) ecm_install_icons(ICONS icons/16-apps-krusader_blue.png icons/16-apps-krusader_red.png icons/16-apps-krusader_root.png icons/16-apps-krusader_user.png icons/22-apps-krusader_blue.png icons/22-apps-krusader_red.png icons/22-apps-krusader_root.png icons/22-apps-krusader_shield.png icons/22-apps-krusader_user.png icons/32-apps-krusader_blue.png icons/32-apps-krusader_red.png icons/32-apps-krusader_root.png icons/32-apps-krusader_shield.png icons/32-apps-krusader_user.png icons/48-apps-krusader_blue.png icons/48-apps-krusader_red.png icons/48-apps-krusader_root.png icons/48-apps-krusader_shield.png icons/48-apps-krusader_user.png icons/64-apps-krusader_blue.png icons/64-apps-krusader_red.png icons/64-apps-krusader_root.png icons/64-apps-krusader_shield.png icons/64-apps-krusader_user.png icons/128-apps-krusader_root.png icons/128-apps-krusader_user.png DESTINATION ${ICON_INSTALL_DIR} ) diff --git a/porting_todo.txt b/porting_todo.txt index 11f8d279..9cc4304b 100644 --- a/porting_todo.txt +++ b/porting_todo.txt @@ -1,21 +1,20 @@ porting to kde plasma - todos ============================= 1 - rewrite CMakeLists rules / variables -all rules were rewritten in a Qt5/KF5 way, still'kde4_add_app_icon' is missing, -I think we should find another way; I didn't changed yet the variables in +all rules were rewritten in a Qt5/KF5 way; I didn't changed yet the variables in 'target_link_libraries', just commented out; btw, with a fast 'cmake', all flags should be generated (flags.make files) 2 - change properly all include ok, I think I've done it, not sure it's 100% correct, we'll find at compile time; I choose to use the full include path (QtCore/QFile, e.g.) because it will be easier to get the qt5/kf5 packages involved next... 3 - new headers... new methods \ No newline at end of file