diff --git a/CMakeLists.txt b/CMakeLists.txt index be5b63aa1..0c2390679 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,9 @@ endif() # Ignore COMPILE_DEFINITIONS_ properties cmake_policy( SET CMP0043 NEW ) +# Link libraries by full path even in implicit directories. +cmake_policy( SET CMP0060 NEW ) + # ``INTERPROCEDURAL_OPTIMIZATION`` is enforced when enabled. cmake_policy( SET CMP0069 NEW ) diff --git a/cmake-proxies/cmake-modules/FindwxWidgets.cmake b/cmake-proxies/cmake-modules/FindwxWidgets.cmake index 116973f28..a8ebdba23 100644 --- a/cmake-proxies/cmake-modules/FindwxWidgets.cmake +++ b/cmake-proxies/cmake-modules/FindwxWidgets.cmake @@ -944,6 +944,7 @@ else() endif() # Check that all libraries are present, as wx-config does not check it +set(_wx_libraries "") set(_wx_lib_missing "") foreach(_wx_lib_ ${wxWidgets_LIBRARIES}) if("${_wx_lib_}" MATCHES "^-l(.*)") @@ -952,10 +953,16 @@ foreach(_wx_lib_ ${wxWidgets_LIBRARIES}) find_library(_wx_lib_found NAMES ${_wx_lib_name} HINTS ${wxWidgets_LIBRARY_DIRS}) if(_wx_lib_found STREQUAL _wx_lib_found-NOTFOUND) list(APPEND _wx_lib_missing ${_wx_lib_name}) + else() + list(APPEND _wx_libraries ${_wx_lib_found}) endif() unset(_wx_lib_found CACHE) + else() + list(APPEND _wx_libraries ${_wx_lib_}) endif() endforeach() +set(wxWidgets_LIBRARIES ${_wx_libraries}) +unset(_wx_libraries) if (_wx_lib_missing) string(REPLACE ";" " " _wx_lib_missing "${_wx_lib_missing}")