From 18ef0138e0857982835a1da262d53d2cce994261 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Tue, 1 Aug 2023 14:09:19 +0200 Subject: Fix build errors --- CMakeLists.txt | 8 ++------ libqmenumodel/src/qmenumodel.pc.in | 2 +- tests/client/CMakeLists.txt | 3 ++- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e96cf8b..5b72d1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,5 @@ -project(qmenumodel) -cmake_minimum_required(VERSION 3.13) -set (PROJECT_VERSION "0.9.1") +cmake_minimum_required (VERSION 3.13) +project (qmenumodel VERSION 0.9.1) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) SET(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "..." FORCE) @@ -58,9 +57,6 @@ if (ENABLE_TESTS) set(TEST_XML_OUTPUT OFF) else() add_subdirectory(tests) - if (ENABLE_COVERAGE) - find_package(CoverageReport) - endif() endif() endif() diff --git a/libqmenumodel/src/qmenumodel.pc.in b/libqmenumodel/src/qmenumodel.pc.in index 94fe217..d5a497a 100644 --- a/libqmenumodel/src/qmenumodel.pc.in +++ b/libqmenumodel/src/qmenumodel.pc.in @@ -5,7 +5,7 @@ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ Name: qmenumodel Description: Qt binding for GMenuModel. -Version: @PROJECT_VERSION@ +Version: @CMAKE_PROJECT_VERSION@ Requires.private: Qt5Core Qt5Widgets gio-2.0 Libs: -L${libdir} -l@SHAREDLIBNAME@ diff --git a/tests/client/CMakeLists.txt b/tests/client/CMakeLists.txt index 34bef38..05d31f3 100644 --- a/tests/client/CMakeLists.txt +++ b/tests/client/CMakeLists.txt @@ -73,7 +73,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qmlfiles.h.in ${CMAKE_CURRENT_BINARY_DIR}/qmlfiles.h) if (ENABLE_COVERAGE) - enable_coverage_report( + find_package(CoverageReport) + ENABLE_COVERAGE_REPORT( TARGETS qmenumodel FILTER -- cgit v1.2.3