diff options
-rw-r--r-- | CMakeLists.txt | 162 | ||||
-rw-r--r-- | icons/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/CMakeLists.txt | 76 | ||||
-rw-r--r-- | src/data/CMakeLists.txt | 15 |
4 files changed, 66 insertions, 189 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c629699a..25bb8a06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,47 +1,40 @@ -# Andrea Diamantini - adjam7 at gmail dot com # rekonq project +# Andrea Diamantini - adjam7 at gmail dot com # ================================================================================== -# minimum cmake required (must be first) - -cmake_minimum_required(VERSION 2.8.9) - -PROJECT( rekonq ) +cmake_minimum_required(VERSION 3.23.3) +project(rekonq VERSION 3.0.0) # ================================================================================== # Information to update before to release this package. # rekonq info -SET(REKONQ_VERSION "2.4.2" ) +SET(REKONQ_VERSION "3.0.0") # TODO change to CMAKE_PROJECT_VERSION configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config-version.h ) -SET(REKONQ_SITE "http://rekonq.kde.org") +SET(REKONQ_SITE "http://rekonq.kde.org") # TODO change to CMAKE_PROJECT_HOMEPAGE_URL SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) # ================================================================================== +include(FeatureSummary) +include(GNUInstallDirs) -FIND_PACKAGE(Qt4 4.8.0 COMPONENTS QtCore QtGui QtNetwork QtWebKit REQUIRED) +find_package(Qt6 6.3.0 COMPONENTS Core Gui Network WebEngineWidgets REQUIRED) +set(AUTO_MOC ON) +set(AUTO_UIC ON) +set(AUTO_RCC ON) -## Ensure we have QtWebKit >= 2.2.0 -#FIND_PACKAGE(PkgConfig REQUIRED) -#PKG_CHECK_MODULES(PC_QTWEBKIT REQUIRED QtWebKit>=4.8.0) -#IF(NOT PC_QTWEBKIT_FOUND) -# MESSAGE(FATAL_ERROR "QtWebkit 2.2.0 is required for this version of Rekonq") -#ELSE() -# MESSAGE(STATUS "Found QtWebKit ${PC_QTWEBKIT_VERSION}") -#ENDIF() +#FIND_PACKAGE(KDE4 4.8.4 REQUIRED) -FIND_PACKAGE(KDE4 4.8.4 REQUIRED) - -INCLUDE(MacroOptionalFindPackage) -INCLUDE(FindPackageHandleStandardArgs) -INCLUDE(KDE4Defaults) -INCLUDE(MacroLibrary) +#INCLUDE(MacroOptionalFindPackage) +#INCLUDE(FindPackageHandleStandardArgs) +#INCLUDE(KDE4Defaults) +#INCLUDE(MacroLibrary) ADD_DEFINITIONS(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) @@ -62,14 +55,14 @@ ENDIF(SOPRANO_FOUND AND NepomukCore_FOUND) # ================================================================================== # optional QCA2 & QtOAuth requirements -MACRO_OPTIONAL_FIND_PACKAGE(QCA2) -MACRO_BOOL_TO_01(QCA2_FOUND HAVE_QCA2) +#MACRO_OPTIONAL_FIND_PACKAGE(QCA2) +#MACRO_BOOL_TO_01(QCA2_FOUND HAVE_QCA2) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-qca2.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config-qca2.h ) -MACRO_OPTIONAL_FIND_PACKAGE(QtOAuth) -MACRO_BOOL_TO_01(QTOAUTH_FOUND HAVE_QTOAUTH) +#MACRO_OPTIONAL_FIND_PACKAGE(QtOAuth) +#MACRO_BOOL_TO_01(QTOAUTH_FOUND HAVE_QTOAUTH) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-qtoauth.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config-qtoauth.h ) @@ -77,8 +70,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-qtoauth.h.cmake ${CMAKE_CURREN # ================================================================================== # optional KActivities requirements -MACRO_OPTIONAL_FIND_PACKAGE(KActivities 6.1.0) -MACRO_BOOL_TO_01(KActivities_FOUND HAVE_KACTIVITIES) +#MACRO_OPTIONAL_FIND_PACKAGE(KActivities 6.1.0) +#MACRO_BOOL_TO_01(KActivities_FOUND HAVE_KACTIVITIES) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-kactivities.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config-kactivities.h ) @@ -90,123 +83,16 @@ MESSAGE(STATUS "---------------------------------------------------------------- MESSAGE(STATUS " rekonq ${REKONQ_VERSION} dependencies results <${REKONQ_SITE}>") MESSAGE(STATUS "") -# Require shared libraries results. - -# ----------------------------------- Qt ------------------------------------- -SET(QT_VERS_STR - "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}" - ) - -IF(QT4_FOUND) - MESSAGE(STATUS " Qt library found...................... YES") - MESSAGE(STATUS " Qt version ${QT_VERS_STR} found! ") -ELSE(QT4_FOUND) - MESSAGE(STATUS " Qt library found...................... NO") - MESSAGE(STATUS "") - MESSAGE(SEND_ERROR " rekonq needs at least Qt ${QT_MIN_VERSION}. Please install it and try compiling again.") - MESSAGE(STATUS " Qt website is at http://qt-project.org") - MESSAGE(STATUS "") -ENDIF(QT4_FOUND) +feature_summary(WHAT ALL) -MESSAGE(STATUS "") - -# ---------------------------------- KDE ------------------------------------- -SET(KDE_VERS_STR - "${KDE_VERSION_MAJOR}.${KDE_VERSION_MINOR}.${KDE_VERSION_RELEASE}" - ) - -IF(KDE4_FOUND) - MESSAGE(STATUS " KDE Desktop Environment............... YES") - MESSAGE(STATUS " KDE version ${KDE_VERS_STR} found! ") -ELSE(KDE4_FOUND) - MESSAGE(STATUS " KDE Desktop Environment............... NO") - MESSAGE(STATUS "") - MESSAGE(SEND_ERROR " rekonq needs at least KDE ${KDE_MIN_VERSION}. Please install it and try compiling again.") - MESSAGE(STATUS " KDE website is at http://www.kde.org") - MESSAGE(STATUS "") -ENDIF(KDE4_FOUND) - -##### FINAL RESULTS ##### - -# create suspance.. -MESSAGE(STATUS "") -MESSAGE(STATUS "") - -IF(QT4_FOUND AND KDE4_FOUND) - MESSAGE(STATUS " rekonq will be compiled............... YES") - SET(REKONQ_CAN_BE_COMPILED true) -ELSE(QT4_FOUND AND KDE4_FOUND) - MESSAGE(FATAL_ERROR " rekonq will NOT be compiled!") - SET(REKONQ_CAN_BE_COMPILED false) -ENDIF(QT4_FOUND AND KDE4_FOUND) - -# ----------------------- Optional Deps -------------------------------------- - -IF(REKONQ_CAN_BE_COMPILED) - MESSAGE(STATUS "") - MESSAGE(STATUS "") - MESSAGE(STATUS " ----- Optional Features") - MESSAGE(STATUS "") - - # Nepomuk - - IF(SOPRANO_FOUND AND NepomukCore_FOUND) - MESSAGE(STATUS " Nepomuk Libraries..................... YES") - MESSAGE(STATUS " Rekonq will be compiled with support for bookmarks nepomuk tagging") - ELSE(SOPRANO_FOUND AND NepomukCore_FOUND) - MESSAGE(STATUS " Nepomuk Libraries..................... NO") - MESSAGE(STATUS " Rekonq will be compiled WITHOUT support for bookmarks tagging") - ENDIF(SOPRANO_FOUND AND NepomukCore_FOUND) - - MESSAGE(STATUS "") - - # QCA2 - - IF(HAVE_QCA2) - MESSAGE(STATUS " QCA2 Libraries........................ YES") - ELSE(HAVE_QCA2) - MESSAGE(STATUS " QCA2 Libraries........................ NO") - ENDIF(HAVE_QCA2) - - # QTOAUTH - - IF(HAVE_QTOAUTH) - MESSAGE(STATUS " QtOAuth Libraries..................... YES") - ELSE(HAVE_QTOAUTH) - MESSAGE(STATUS " QtOAuth Libraries..................... NO") - ENDIF(HAVE_QTOAUTH) - - - IF(HAVE_QCA2 AND HAVE_QTOAUTH) - MESSAGE(STATUS " Rekonq will be compiled with support for opera sync handler") - ELSE(HAVE_QCA2 AND HAVE_QTOAUTH) - MESSAGE(STATUS " Rekonq will be compiled WITHOUT support for opera sync handler") - ENDIF(HAVE_QCA2 AND HAVE_QTOAUTH) - - # KActivities - - IF(HAVE_KACTIVITIES) - MESSAGE(STATUS " KActivities Libraries................. YES") - MESSAGE(STATUS " Rekonq will be compiled with support for activities") - ELSE(HAVE_KACTIVITIES) - MESSAGE(STATUS " KActivities Libraries................. NO") - MESSAGE(STATUS " Rekonq will be compiled WITHOUT support for activities") - ENDIF(HAVE_KACTIVITIES) - - MESSAGE(STATUS "") - MESSAGE(STATUS "-----------------------------------------------------------------------") - MESSAGE(STATUS "") - -ENDIF(REKONQ_CAN_BE_COMPILED) +# Require shared libraries results. # =============================================================================== -IF(REKONQ_CAN_BE_COMPILED) ADD_SUBDIRECTORY( src ) ADD_SUBDIRECTORY( icons ) -ENDIF(REKONQ_CAN_BE_COMPILED) # ================================================================================ diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt index 9d7ead58..622f18d4 100644 --- a/icons/CMakeLists.txt +++ b/icons/CMakeLists.txt @@ -1,2 +1,2 @@ # install standard icons -KDE4_INSTALL_ICONS( ${ICON_INSTALL_DIR} ) +#KDE4_INSTALL_ICONS( ${ICON_INSTALL_DIR} ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6df5a647..0eb98dc9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,7 +5,7 @@ ADD_SUBDIRECTORY( data ) ### ------- SETTING REKONQ FILES.. add_definitions(-DQT_STATICPLUGIN) -QT4_WRAP_CPP(wk_HEADERS_MOC qwebkitplatformplugin.h) +#QT4_WRAP_CPP(wk_HEADERS_MOC qwebkitplatformplugin.h) # src files set(rekonq_KDEINIT_SRCS @@ -120,31 +120,6 @@ set(rekonq_KDEINIT_SRCS #---------------------------------------- kspellplugin.cpp ${wk_HEADERS_MOC} -) - - -# Nepomuk OPTIONAL src files -IF(NepomukCore_FOUND) - SET( rekonq_KDEINIT_SRCS - ${rekonq_KDEINIT_SRCS} - urlbar/resourcelinkdialog.cpp - urlbar/newresourcedialog.cpp - nepomuk/utils/simpleresourcemodel.cpp - nepomuk/utils/resourcemodel.cpp - ) -ENDIF(NepomukCore_FOUND) - - -# Opera sync optional src files -IF(HAVE_QCA2 AND HAVE_QTOAUTH) - SET( rekonq_KDEINIT_SRCS - ${rekonq_KDEINIT_SRCS} - sync/operasynchandler.cpp - ) -ENDIF(HAVE_QCA2 AND HAVE_QTOAUTH) - -# ui files -KDE4_ADD_UI_FILES( rekonq_KDEINIT_SRCS # ---------------------------------------- adblock/blocked_elements.ui adblock/settings_adblock.ui @@ -172,9 +147,29 @@ KDE4_ADD_UI_FILES( rekonq_KDEINIT_SRCS cleardata.ui session.ui webappcreation.ui - ) +) + + +# Nepomuk OPTIONAL src files +IF(NepomukCore_FOUND) + SET( rekonq_KDEINIT_SRCS + ${rekonq_KDEINIT_SRCS} + urlbar/resourcelinkdialog.cpp + urlbar/newresourcedialog.cpp + nepomuk/utils/simpleresourcemodel.cpp + nepomuk/utils/resourcemodel.cpp + ) +ENDIF(NepomukCore_FOUND) +# Opera sync optional src files +IF(HAVE_QCA2 AND HAVE_QTOAUTH) + SET( rekonq_KDEINIT_SRCS + ${rekonq_KDEINIT_SRCS} + sync/operasynchandler.cpp + ) +ENDIF(HAVE_QCA2 AND HAVE_QTOAUTH) + ### ------------- INCLUDING DIRECTORIES... INCLUDE_DIRECTORIES ( ${CMAKE_CURRENT_SOURCE_DIR} @@ -228,32 +223,23 @@ ADD_DEFINITIONS ( ${KDE4_DEFINITIONS} ) ### -------------- ADDING APPLICATION ICON... -KDE4_ADD_APP_ICON( rekonq_KDEINIT_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../icons/hi*-app-rekonq.png ) +#KDE4_ADD_APP_ICON( rekonq_KDEINIT_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../icons/hi*-app-rekonq.png ) ### -------------- ADDING APPLICATION KCFG FILES... -KDE4_ADD_KCFG_FILES( rekonq_KDEINIT_SRCS rekonq.kcfgc ) +#KDE4_ADD_KCFG_FILES( rekonq_KDEINIT_SRCS rekonq.kcfgc ) ### --------------- ADDING EXECUTABLE... -KDE4_ADD_KDEINIT_EXECUTABLE( rekonq ${rekonq_KDEINIT_SRCS} main.cpp ) +#KDE4_ADD_KDEINIT_EXECUTABLE( rekonq ${rekonq_KDEINIT_SRCS} main.cpp ) +add_executable(rekonq ${rekonq_KDEINIT_SRCS} main.cpp) ### --------------- TARGETTING LINK LIBRARIES... -TARGET_LINK_LIBRARIES ( kdeinit_rekonq - ${QT_LIBRARIES} - ${QT_QTSCRIPT_LIBRARY} - ${QT_QTWEBKIT_LIBRARY} - ${KDE4_KDEWEBKIT_LIBS} - ${KDE4_KUTILS_LIBS} - ${KDE4_KDEUI_LIBS} - ${KDE4_KIO_LIBS} - ${KDE4_KPARTS_LIBS} - ${KDE4_SOLID_LIBS} -) +target_link_libraries(rekonq Qt6::Widgets Qt6::WebEngineWidgets) # Nepomuk optional target link libraries IF(SOPRANO_FOUND AND NepomukCore_FOUND) @@ -281,13 +267,13 @@ ENDIF(HAVE_QCA2 AND HAVE_QTOAUTH) ### ------------ INSTALL FILES... -INSTALL( TARGETS rekonq ${INSTALL_TARGETS_DEFAULT_ARGS} ) -INSTALL( TARGETS kdeinit_rekonq ${INSTALL_TARGETS_DEFAULT_ARGS} ) +#INSTALL( TARGETS rekonq ${INSTALL_TARGETS_DEFAULT_ARGS} ) +#INSTALL( TARGETS kdeinit_rekonq ${INSTALL_TARGETS_DEFAULT_ARGS} ) # kwebapp script install (provided for retro-compatibility...) #FILE( COPY data/kwebapp DESTINATION ${BIN_INSTALL_DIR} # FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) -INSTALL( FILES rekonq.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) -INSTALL( FILES webwindow/rekonqui.rc DESTINATION ${DATA_INSTALL_DIR}/rekonq ) +#INSTALL( FILES rekonq.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) +#INSTALL( FILES webwindow/rekonqui.rc DESTINATION ${DATA_INSTALL_DIR}/rekonq ) diff --git a/src/data/CMakeLists.txt b/src/data/CMakeLists.txt index cda545f0..51fd0bf6 100644 --- a/src/data/CMakeLists.txt +++ b/src/data/CMakeLists.txt @@ -10,21 +10,24 @@ INSTALL( webkit-icon.png autoscroll.png background.png - DESTINATION ${DATA_INSTALL_DIR}/rekonq/pics + DESTINATION ${CMAKE_INSTALL_DATADIR}/rekonq/pics ) +message(STATUS "install ${CMAKE_INSTALL_DATADIR}/rekonq/pics") # default bookmarks INSTALL( FILES defaultbookmarks.xbel - DESTINATION ${DATA_INSTALL_DIR}/rekonq + DESTINATION ${CMAKE_INSTALL_DATADIR}/rekonq ) +message(STATUS "install ${CMAKE_INSTALL_DATADIR}/rekonq") # .desktop file INSTALL( PROGRAMS rekonq.desktop - DESTINATION ${XDG_APPS_INSTALL_DIR} + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} ) +message(STATUS "install ${CMAKE_INSTALL_DATAROOTDIR}") # htmls INSTALL( @@ -33,13 +36,15 @@ INSTALL( home.html jquery-1.7.2.min.js jquery-ui-1.8.20.custom.min.js - DESTINATION ${DATA_INSTALL_DIR}/rekonq/htmls + DESTINATION ${CMAKE_INSTALL_DATADIR}/rekonq/htmls ) +message(STATUS "install ${CMAKE_INSTALL_DATAROOTDIR}/rekonq/htmls") # adblock default settings INSTALL( FILES adblockrc - DESTINATION ${DATA_INSTALL_DIR}/rekonq + DESTINATION ${CMAKE_INSTALL_DATADIR}/rekonq ) +message(STATUS "install ${CMAKE_INSTALL_DATAROOTDIR}/rekonq") |