summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBhushan Shah <[email protected]>2014-08-23 12:36:19 +0530
committerBhushan Shah <[email protected]>2014-08-23 12:36:19 +0530
commit1dc376f562559deb4912b264e8715828cc3c3ce0 (patch)
treefa41b97e412e025a11f02506539ee4b103e75b28
parentd6eb1a0966e7c98ab7ba096b3cbddd883954c899 (diff)
Port CMakeLists.txt
-rw-r--r--CMakeLists.txt54
-rw-r--r--kerfuffle/CMakeLists.txt12
2 files changed, 30 insertions, 36 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index db46703..d19048d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,33 +1,26 @@
project(ark)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
-if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
- find_package(KDE4)
- include( KDE4Defaults )
- include_directories(${KDE4_INCLUDES})
+find_package(LibArchive)
+#macro_log_feature(LIBARCHIVE_FOUND "LibArchive" "A library for dealing with a wide variety of archive file formats" "http://code.google.com/p/libarchive/" FALSE "" "Required for among others tar, tar.gz, tar.bz2 formats in Ark.")
- add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
- add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
+configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake)
- # If definitions like -D_GNU_SOURCE are needed for these checks they
- # should be added to _KDE4_PLATFORM_DEFINITIONS when it is originally
- # defined outside this file. Here we include these definitions in
- # CMAKE_REQUIRED_DEFINITIONS so they will be included in the build of
- # checks below.
- set( CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS} )
-endif()
+include(FeatureSummary)
-include( MacroLibrary )
-list(APPEND CMAKE_MODULE_PATH ${ark_SOURCE_DIR}/cmake/modules)
+find_package(ECM 1.0.0 REQUIRED NO_MODULE)
+set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
-macro_optional_find_package(LibArchive)
-macro_log_feature(LIBARCHIVE_FOUND "LibArchive" "A library for dealing with a wide variety of archive file formats" "http://code.google.com/p/libarchive/" FALSE "" "Required for among others tar, tar.gz, tar.bz2 formats in Ark.")
+include(KDEInstallDirs)
+include(KDECMakeSettings)
+include(KDECompilerSettings)
-configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake)
+set(REQUIRED_QT_VERSION 5.2.0)
+set(KF5_MIN_VERSION 5.0.0)
-add_definitions(-DQT_NO_CAST_FROM_ASCII)
+find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core Widgets)
+find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Archive Config KDELibs4Support)
option(WITH_TEST_COVERAGE "Build with test coverage support" OFF)
if (WITH_TEST_COVERAGE)
@@ -38,13 +31,14 @@ endif (WITH_TEST_COVERAGE)
set(SUPPORTED_ARK_MIMETYPES "")
-add_subdirectory(plugins)
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_BINARY_DIR}
+)
+
+#add_subdirectory(plugins)
add_subdirectory(kerfuffle)
-add_subdirectory(part)
-add_subdirectory(app)
-add_subdirectory(doc)
-
-if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
- message(STATUS "Supported MIME types: ${SUPPORTED_ARK_MIMETYPES}")
- macro_display_feature_log()
-endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
+#add_subdirectory(part)
+#add_subdirectory(app)
+#add_subdirectory(doc)
+
diff --git a/kerfuffle/CMakeLists.txt b/kerfuffle/CMakeLists.txt
index 8c56b4f..47cf891 100644
--- a/kerfuffle/CMakeLists.txt
+++ b/kerfuffle/CMakeLists.txt
@@ -1,5 +1,5 @@
-macro_optional_find_package(QJSON)
-macro_log_feature(QJSON_FOUND "qjson" "A library for processing and serializing JSON files" "http://qjson.sourceforge.net" FALSE "" "Required for compiling Ark's unit tests")
+#find_package(QJSON)
+#macro_log_feature(QJSON_FOUND "qjson" "A library for processing and serializing JSON files" "http://qjson.sourceforge.net" FALSE "" "Required for compiling Ark's unit tests")
########### next target ###############
@@ -14,13 +14,13 @@ set(kerfuffle_SRCS
cliinterface.cpp
)
-kde4_add_kcfg_files(kerfuffle_SRCS settings.kcfgc)
+kconfig_add_kcfg_files(kerfuffle_SRCS settings.kcfgc)
-kde4_add_ui_files(kerfuffle_SRCS extractiondialog.ui adddialog.ui )
+qt5_wrap_ui(kerfuffle_SRCS extractiondialog.ui adddialog.ui )
-kde4_add_library(kerfuffle SHARED ${kerfuffle_SRCS})
+add_library(kerfuffle SHARED ${kerfuffle_SRCS})
-target_link_libraries(kerfuffle ${KDE4_KFILE_LIBS} ${KDE4_KPARTS_LIBS})
+target_link_libraries(kerfuffle KF5::KDELibs4Support)
if (NOT WIN32)
target_link_libraries(kerfuffle ${KDE4_KPTY_LIBS})
endif (NOT WIN32)