Commit f53faedb authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Use ecm_qt_install_logging_categories

GIT_SILENT
parent 2160b67e
......@@ -2,8 +2,8 @@ cmake_minimum_required (VERSION 3.5 FATAL_ERROR)
project(libkmahjongg VERSION "5.0.0")
set(QT_MIN_VERSION "5.9.0")
set (KF5_MIN_VERSION "5.46.0")
set(QT_MIN_VERSION "5.12.0")
set(KF5_MIN_VERSION "5.68.0")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
......@@ -35,25 +35,16 @@ include(ECMQtDeclareLoggingCategory)
add_definitions(
-DQT_NO_KEYWORDS
-DQT_NO_FOREACH
-DQT_STRICT_ITERATORS
-DQT_DISABLE_DEPRECATED_BEFORE=0x050900
-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x052E00
)
if (${KF5Config_VERSION} STRGREATER "5.56.0")
add_definitions(-DQT_NO_FOREACH)
MESSAGE(STATUS "compile without foreach")
endif()
add_subdirectory(src)
add_subdirectory(tilesets)
add_subdirectory(backgrounds)
if (${ECM_VERSION} STRGREATER "5.58.0")
install( FILES libkmahjongg.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR} )
else()
install( FILES libkmahjongg.categories DESTINATION ${KDE_INSTALL_CONFDIR} )
endif()
ki18n_install(po)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
log_libkmahjongg kdegames (libkmahjongg) IDENTIFIER [LIBKMAHJONGG_LOG]
......@@ -19,6 +19,8 @@ ecm_qt_declare_logging_category(kmahjongg_LIB_SRCS
HEADER libkmahjongg_debug.h
IDENTIFIER LIBKMAHJONGG_LOG
CATEGORY_NAME log_libkmahjongg
DESCRIPTION "libkmahjongg"
EXPORT KMAHJONGG
)
ki18n_wrap_ui(kmahjongg_LIB_SRCS
......@@ -72,6 +74,12 @@ install(FILES
export(TARGETS KF5KMahjongglib FILE "${PROJECT_BINARY_DIR}/KF5KMahjonggLibraryDepends.cmake")
ecm_qt_install_logging_categories(
EXPORT KMAHJONGG
FILE libkmahjongg.categories
DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
)
set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KF5KMahjongglib")
configure_package_config_file(
......
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