Commit 9cbec555 authored by Martin Tobias Holmedahl Sandsmark's avatar Martin Tobias Holmedahl Sandsmark
Browse files

Initial port of cmake files

parent 46aa52cf
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)
......@@ -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
......
......@@ -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})
......
......@@ -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 ###############
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment