<commit_before>project(libkubuntu)

cmake_minimum_required(VERSION 2.8.12)

find_package(ECM 0.0.14 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})

include(ECMGenerateHeaders)
include(ECMGeneratePriFile)
include(ECMPackageConfigHelpers)
include(ECMPoQmTools)
include(ECMSetupVersion)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)

include(CMakePackageConfigHelpers)

set(REQUIRED_QT_VERSION 5.2.0) # Used in QAptConfig
find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets)

find_package(KF5 REQUIRED
    COMPONENTS
        I18n
        KIO)

find_package(QApt REQUIRED)

ecm_setup_version(1.0.0 VARIABLE_PREFIX KUBUNTU
    PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KubuntuConfigVersion.cmake"
    SOVERSION 1)

# --------------------------

add_subdirectory(autotests)
add_subdirectory(src)

# --------------------------

set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/Kubuntu")

ecm_configure_package_config_file(
    "${CMAKE_CURRENT_SOURCE_DIR}/KubuntuConfig.cmake.in"
    "${CMAKE_CURRENT_BINARY_DIR}/KubuntuConfig.cmake"
    INSTALL_DESTINATION  ${CMAKECONFIG_INSTALL_DIR})

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/KubuntuConfig.cmake"
              "${CMAKE_CURRENT_BINARY_DIR}/KubuntuConfigVersion.cmake"
        DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
        COMPONENT Devel)
<commit_msg>require ECM 1.5 and set a major version compat<commit_after>project(libkubuntu)

cmake_minimum_required(VERSION 2.8.12)

find_package(ECM 1.5.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})

include(ECMGenerateHeaders)
include(ECMGeneratePriFile)
include(ECMPackageConfigHelpers)
include(ECMPoQmTools)
include(ECMSetupVersion)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)

include(CMakePackageConfigHelpers)

set(REQUIRED_QT_VERSION 5.2.0) # Used in QAptConfig
find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets)

find_package(KF5 REQUIRED
    COMPONENTS
        I18n
        KIO)

find_package(QApt REQUIRED)

ecm_setup_version(1.0.0 VARIABLE_PREFIX KUBUNTU
    SOVERSION 1
    PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KubuntuConfigVersion.cmake"
        COMPATIBILITY SameMajorVersion)

# --------------------------

add_subdirectory(autotests)
add_subdirectory(src)

# --------------------------

set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/Kubuntu")

ecm_configure_package_config_file(
    "${CMAKE_CURRENT_SOURCE_DIR}/KubuntuConfig.cmake.in"
    "${CMAKE_CURRENT_BINARY_DIR}/KubuntuConfig.cmake"
    INSTALL_DESTINATION  ${CMAKECONFIG_INSTALL_DIR})

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/KubuntuConfig.cmake"
              "${CMAKE_CURRENT_BINARY_DIR}/KubuntuConfigVersion.cmake"
        DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
        COMPONENT Devel)

{'fraction_non_alphanumeric': 0.11871365035921998, 'fraction_numerical': 0.013342456380431064, 'mean_word_length': 5.301724137931035, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '861529', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1054, 'n_words': 130}