This repository has been archived by the owner on Jan 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
111 lines (89 loc) · 3.85 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Copyright (C) 2019 Casper Meijn <[email protected]>
# SPDX-License-Identifier: GPL-3.0-or-later
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
cmake_minimum_required(VERSION 3.7)
project(kdsoap-ws-discovery-client VERSION 0.2)
include(FeatureSummary)
find_package(ECM 5.54.0 NO_MODULE)
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules")
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
include(CTest)
include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
include(GenerateExportHeader)
set(REQUIRED_QT_VERSION 5.9.0)
find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE COMPONENTS Core Network Xml)
find_package(KDSoap 1.9.0 REQUIRED)
set_package_properties(KDSoap PROPERTIES
DESCRIPTION "A Qt-based client-side and server-side SOAP component"
URL "http://www.kdab.com/products/kd-soap"
TYPE REQUIRED
PURPOSE "Support for SOAP client protocol"
)
if (BUILD_TESTING)
find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Test)
endif()
include(ECMSetupVersion)
include(ECMGenerateHeaders)
include(ECMQtDeclareLoggingCategory)
include(ECMAddQch)
option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF)
add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)")
ecm_setup_version(PROJECT
VARIABLE_PREFIX WSDISCOVERY
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kdsoap_wsdiscovery_client_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KDSoapWSDiscoveryClientConfigVersion.cmake"
)
add_subdirectory(src)
add_subdirectory(examples)
add_subdirectory(docs)
if(BUILD_TESTING)
add_subdirectory(autotests)
endif()
# create a Config.cmake and a ConfigVersion.cmake file and install them
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KDSoapWSDiscoveryClient")
if (BUILD_QCH)
ecm_install_qch_export(
TARGETS KDSoapWSDiscoveryClient_QCH
FILE KDSoapWSDiscoveryClientQchTargets.cmake
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KDSoapWSDiscoveryClientQchTargets.cmake\")")
endif()
include(CMakePackageConfigHelpers)
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KDSoapWSDiscoveryClientConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KDSoapWSDiscoveryClientConfig.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kdsoap_wsdiscovery_client_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KDSoapWSDiscoveryClient
COMPONENT Devel)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/KDSoapWSDiscoveryClientConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KDSoapWSDiscoveryClientConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel)
install(EXPORT KDSoapWSDiscoveryClientTargets
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
FILE KDSoapWSDiscoveryClientTargets.cmake
NAMESPACE KDSoap::)
feature_summary(
WHAT ALL
FATAL_ON_MISSING_REQUIRED_PACKAGES
)