CMake updates to remove warnings when using recent CMake versions

This commit is contained in:
Bill Somerville 2019-05-28 19:00:13 +01:00
parent e3ecd55281
commit e1451202f4
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F
2 changed files with 9 additions and 2 deletions

View File

@ -19,9 +19,12 @@ find_path (__hamlib_pc_path NAMES hamlib.pc
PATH_SUFFIXES lib/pkgconfig lib64/pkgconfig PATH_SUFFIXES lib/pkgconfig lib64/pkgconfig
) )
if (__hamlib_pc_path) if (__hamlib_pc_path)
set (ENV{PKG_CONFIG_PATH} "${__hamlib_pc_path}" "$ENV{PKG_CONFIG_PATH}") set (__pc_path $ENV{PKG_CONFIG_PATH})
unset (__hamlib_pc_path CACHE) list (APPEND __pc_path "${__hamlib_pc_path}")
set (ENV{PKG_CONFIG_PATH} "${__pc_path}")
unset (__pc_path CACHE)
endif () endif ()
unset (__hamlib_pc_path CACHE)
# Use pkg-config to get hints about paths, libs and, flags # Use pkg-config to get hints about paths, libs and, flags
unset (__pkg_config_checked_hamlib CACHE) unset (__pkg_config_checked_hamlib CACHE)

View File

@ -39,6 +39,10 @@ if (POLICY CMP0063)
cmake_policy (SET CMP0063 NEW) # honour visibility properties for all library types cmake_policy (SET CMP0063 NEW) # honour visibility properties for all library types
endif (POLICY CMP0063) 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) include (${PROJECT_SOURCE_DIR}/CMake/VersionCompute.cmake)
message (STATUS "Building ${CMAKE_PROJECT_NAME}-${wsjtx_VERSION}") message (STATUS "Building ${CMAKE_PROJECT_NAME}-${wsjtx_VERSION}")