1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-12 07:35:51 +01:00

Fix CMake/wxWidgets link issue

This corrects linking of the wxWidgets libraries when there's multiple
copies and the desired one is later in the search path.  This can affect
any non-Windows system that doesn't have it's wxWidgets in "standard"
libraries (like our wxWidgets builds on the Mac).

The wrong wxWidgets libraries can be picked up by the linker if other
"-L" arguments appear before the wxWidgets specific on.  This can happen
if you have something like Homebrew installed and CMake finds one of the
libraries (like libogg) installed.  It will put a "-L/usr/local/lib" in
the linker arguments before the "-L/usr/local/x86_64" wxWidgets flag,
and if there happens to be wxWidgets libs in /usr/local/lib, the linker
will pull the wxWidgets libs from /usr/local/lib...not what was wanted.
This commit is contained in:
Leland Lucius
2020-02-24 13:45:16 -06:00
parent 87034a0a67
commit 3545097fe9
2 changed files with 10 additions and 0 deletions

View File

@@ -22,6 +22,9 @@ endif()
# Ignore COMPILE_DEFINITIONS_<Config> 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 )