Commit 3f4fc9d4 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Random cmake cleanup

Summary: Remove unneeded calls, make coding style a bit more consistent

Test Plan: builds

Reviewers: #frameworks, bshah, leinir, apol

Reviewed By: apol

Differential Revision: https://phabricator.kde.org/D27706
parent be294dcc
......@@ -5,13 +5,10 @@ cmake_minimum_required(VERSION 2.8.12)
set(QT_REQUIRED_VERSION "5.7.0")
set(KF5_MIN_VERSION "5.4.0")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
enable_testing()
set(RELEASE_SERVICE_VERSION_MAJOR "20")
set(RELEASE_SERVICE_VERSION_MINOR "03")
set(RELEASE_SERVICE_VERSION_MICRO "70")
......@@ -36,11 +33,8 @@ set_package_properties(SignOnQt5 PROPERTIES DESCRIPTION "D-Bus service which per
TYPE REQUIRED
PURPOSE "Required for building this module")
add_definitions (
-DQT_NO_KEYWORDS)
add_definitions (-DTRANSLATION_DOMAIN=\"kaccounts-integration\" -DQT_NO_KEYWORDS -DQT_NO_FOREACH)
add_definitions(-DTRANSLATION_DOMAIN=\"kaccounts-integration\")
add_definitions(-DQT_NO_FOREACH)
if (EXISTS "${CMAKE_SOURCE_DIR}/.git" AND AccountsQt5_VERSION VERSION_GREATER 1.15)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000)
......@@ -52,13 +46,13 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMInstallIcons)
include(FeatureSummary)
kde_enable_exceptions()
include(ECMSetupVersion)
include(ECMGenerateHeaders)
include(GenerateExportHeader)
include(ECMPackageConfigHelpers)
include_directories(${ACCOUNTSQT_INCLUDE_DIRS} ${SIGNONQT_INCLUDE_DIRS})
remove_definitions(-DQT_NO_CAST_FROM_ASCII)
add_subdirectory(src)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
project (kaccounts-support-library)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
)
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KAccounts")
include(ECMGenerateHeaders)
include(ECMPackageConfigHelpers)
include(ECMSetupVersion)
include(CMakePackageConfigHelpers)
include(WriteBasicConfigVersionFile)
include(KDECMakeSettings)
include(GenerateExportHeader)
ecm_setup_version(${KACCOUNTS_VERSION}
VARIABLE_PREFIX KACCOUNTS
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kaccounts_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KAccountsConfigVersion.cmake"
SOVERSION ${KACCOUNTS_SOVERSION})
set (kaccountslib_SRCS
set(kaccountslib_SRCS
accountservicetogglejob.cpp
createaccountjob.cpp
kaccountsuiplugin.cpp
......@@ -41,9 +27,7 @@ ecm_generate_headers(kaccountslib_HEADERS
REQUIRED_HEADERS kaccountslib_HEADERS
)
add_library (kaccounts SHARED
${kaccountslib_SRCS}
)
add_library(kaccounts ${kaccountslib_SRCS})
generate_export_header(kaccounts BASE_NAME kaccounts)
target_link_libraries (kaccounts
......
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