summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-06-18 16:53:24 (GMT)
committerMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-06-18 16:53:24 (GMT)
commit9cbec5550954f67d86dcf77fe25c6f318798928e (patch)
tree2e002b255de6a6dc091efb1656db17692cf2da43
parent46aa52cf1fe052af184339d0b3e5b003503d26eb (diff)
Initial port of cmake files
-rw-r--r--CMakeLists.txt28
-rw-r--r--lib/CMakeLists.txt6
-rw-r--r--strigi/CMakeLists.txt4
-rw-r--r--thumbnailers/CMakeLists.txt9
4 files changed, 26 insertions, 21 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ea2e644..65f0a0d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,26 +1,26 @@
-cmake_minimum_required(VERSION 2.8.9)
+cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
+
project(mobipocket)
-find_package(KDE4 4.6.0 REQUIRED)
-include(KDE4Defaults)
-include(MacroLibrary)
-include(MacroOptionalAddSubdirectory)
+find_package(ECM 1.3.0 REQUIRED NO_MODULE)
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
-find_package(Strigi)
-macro_log_feature(STRIGI_FOUND "strigi libraries" "Provide a strigi analyzer for Mobipocket documents" "" FALSE "" "")
+include(FeatureSummary)
+include(ECMOptionalAddSubdirectory)
+include(KDEInstallDirs)
+include(KDECMakeSettings)
+include(KDECompilerSettings NO_POLICY_SCOPE)
-add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
-include_directories(${KDE4_INCLUDES})
+find_package(Qt5 5.4 CONFIG REQUIRED Core Gui)
add_subdirectory(lib)
-macro_optional_add_subdirectory(thumbnailers)
-if(STRIGI_FOUND)
- macro_optional_add_subdirectory(strigi)
-endif()
+ecm_optional_add_subdirectory(thumbnailers)
+
+#ecm_optional_add_subdirectory(strigi)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/QMobipocketConfig.cmake
DESTINATION ${LIB_INSTALL_DIR}/cmake/QMobipocket )
-macro_display_feature_log()
+feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 90fc229..f88d0b0 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -5,11 +5,11 @@ set (QMOBIPOCKET_SRCS
qfilestream.cpp
)
-kde4_add_library(qmobipocket SHARED ${QMOBIPOCKET_SRCS})
+add_library(qmobipocket SHARED ${QMOBIPOCKET_SRCS})
target_link_libraries (qmobipocket
- ${QT_QTCORE_LIBRARY}
- ${QT_QTGUI_LIBRARY}
+ Qt5::Core
+ Qt5::Gui
)
install(FILES
diff --git a/strigi/CMakeLists.txt b/strigi/CMakeLists.txt
index 895284f..41d443f 100644
--- a/strigi/CMakeLists.txt
+++ b/strigi/CMakeLists.txt
@@ -9,9 +9,9 @@ set(mobianalyzer_SRCS
mobiendanalyzer.cpp
)
-kde4_add_library(mobi MODULE ${mobianalyzer_SRCS})
+add_library(mobi MODULE ${mobianalyzer_SRCS})
-target_link_libraries(mobi ${STRIGI_STREAMS_LIBRARY} ${STRIGI_STREAMANALYZER_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} qmobipocket)
+target_link_libraries(mobi ${STRIGI_STREAMS_LIBRARY} ${STRIGI_STREAMANALYZER_LIBRARY} Qt5::Core Qt5::Gui qmobipocket)
# install the module in the right directory so it is picked up
set_target_properties(mobi PROPERTIES PREFIX ${STRIGI_LINE_ANALYZER_PREFIX})
diff --git a/thumbnailers/CMakeLists.txt b/thumbnailers/CMakeLists.txt
index 9077065..5fb4814 100644
--- a/thumbnailers/CMakeLists.txt
+++ b/thumbnailers/CMakeLists.txt
@@ -9,8 +9,13 @@ set(mobithumbnail_SRCS
mobithumbnail.cpp
)
-kde4_add_plugin(mobithumbnail ${mobithumbnail_SRCS})
-target_link_libraries(mobithumbnail ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} ${QT_QTGUI_LIBRARY} qmobipocket)
+find_package(KF5 REQUIRED
+ KIO
+ KDELibs4Support
+ )
+
+add_library(mobithumbnail MODULE ${mobithumbnail_SRCS})
+target_link_libraries(mobithumbnail KF5::KDELibs4Support KF5::KIOCore Qt5::Gui qmobipocket)
install(TARGETS mobithumbnail DESTINATION ${PLUGIN_INSTALL_DIR})
########### install files ###############