From d81e4c417d4ba6305bd02666c82c5500584702e0 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 24 May 2021 15:44:05 +0000 Subject: [PATCH] CMake: various tidying-up (cherry picked from commit 294f0c7e1a47c33b1f8362ba3a975c82427ec0c8) --- cmake/Findcmark.cmake | 8 +++++--- src/CMakeLists.txt | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/Findcmark.cmake b/cmake/Findcmark.cmake index f9a11bdf8..9858e5df6 100644 --- a/cmake/Findcmark.cmake +++ b/cmake/Findcmark.cmake @@ -7,14 +7,16 @@ # first try to find cmark-config.cmake # path to a file not in the search path can be set with 'cmake -Dcmark_DIR=some/path/' -find_package(cmark CONFIG) +find_package(cmark CONFIG QUIET) if(cmark_FOUND AND TARGET cmark::cmark) # found it! return() endif() -include(FindPkgConfig) -pkg_check_modules(PC_CMARK QUIET cmark) +find_package(PkgConfig QUIET) +if(PKG_CONFIG_FOUND) + pkg_check_modules(PC_CMARK QUIET cmark) +endif() if(NOT CMARK_INCLUDE_DIR) find_path(CMARK_INCLUDE_DIR diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 047dd6124..4300c1d86 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -33,7 +33,7 @@ add_executable(neochat ../res.qrc ) -if(${Quotient_VERSION_MINOR} GREATER 6) +if(Quotient_VERSION_MINOR GREATER 6) target_compile_definitions(neochat PRIVATE QUOTIENT_07) endif()