From 8035880c451dc4938d8e8380da10c97b5151cf0b Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Tue, 28 May 2019 19:00:13 +0100 Subject: [PATCH] CMake updates to remove warnings when using recent CMake versions --- CMake/Modules/Findhamlib.cmake | 7 +++++-- CMakeLists.txt | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CMake/Modules/Findhamlib.cmake b/CMake/Modules/Findhamlib.cmake index 98419bda1..234083ae1 100644 --- a/CMake/Modules/Findhamlib.cmake +++ b/CMake/Modules/Findhamlib.cmake @@ -19,9 +19,12 @@ find_path (__hamlib_pc_path NAMES hamlib.pc PATH_SUFFIXES lib/pkgconfig lib64/pkgconfig ) if (__hamlib_pc_path) - set (ENV{PKG_CONFIG_PATH} "${__hamlib_pc_path}" "$ENV{PKG_CONFIG_PATH}") - unset (__hamlib_pc_path CACHE) + set (__pc_path $ENV{PKG_CONFIG_PATH}) + list (APPEND __pc_path "${__hamlib_pc_path}") + set (ENV{PKG_CONFIG_PATH} "${__pc_path}") + unset (__pc_path CACHE) endif () +unset (__hamlib_pc_path CACHE) # Use pkg-config to get hints about paths, libs and, flags unset (__pkg_config_checked_hamlib CACHE) diff --git a/CMakeLists.txt b/CMakeLists.txt index a8093b100..d5d18467c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,10 @@ if (POLICY CMP0063) cmake_policy (SET CMP0063 NEW) # honour visibility properties for all library types endif (POLICY CMP0063) +if (POLICY CMP0071) + cmake_policy (SET CMP0071 NEW) # run automoc and autouic on generated sources +endif (POLICY CMP0071) + include (${PROJECT_SOURCE_DIR}/CMake/VersionCompute.cmake) message (STATUS "Building ${CMAKE_PROJECT_NAME}-${wsjtx_VERSION}")