cmake compatibility fix

This commit is contained in:
Jason Rhinelander 2020-03-14 15:17:48 -03:00
parent 3d315ba123
commit dd088c8ba5
1 changed files with 5 additions and 3 deletions

View File

@ -73,9 +73,11 @@ if(NOT SODIUM_LIBRARIES)
pkg_search_module(SODIUM REQUIRED libsodium) pkg_search_module(SODIUM REQUIRED libsodium)
endif() endif()
# allow adding links to non-local targets (which is allowed even under old policy as long as the if(NOT ${CMAKE_VERSION} VERSION_LESS 3.13)
# target is an interface, but under new cmake it spews out warnings). # allow adding links to non-local targets (which is allowed even under old policy as long as the
cmake_policy(SET CMP0079 NEW) # target is an interface, but under new cmake it spews out warnings).
cmake_policy(SET CMP0079 NEW)
endif()
function(link_dep_libs target linktype libdirs) function(link_dep_libs target linktype libdirs)
foreach(lib ${ARGN}) foreach(lib ${ARGN})