Cannot locate WxWidgets installation which was created by CI server
On Linux, the current FindWxWidgets.cmake
implementation has trouble finding a wxwidgets
"installation" which was created by a CI server. The problem is that it internally calls
wx-config --cxxflags
which basically yiels something like:
-I/build/path/on/ci/to/wxwidgets/lib/wx/include/gtk2-unicode-3.1 -I/build/path/on/ci/to/wxwidgets/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread
And then CMake fails with:
wxWidgets wx/version.h file not found in
/build/path/on/ci/to/wxwidgets/lib/wx/include/gtk2-unicode-3.1;/build/path/on/ci/to/wxwidgets/include/wx-3.1.
So what happens in the FindWxWidgets.cmake
file, is that the include directories returned by wx-config
are parsed and taken as the base / root directory.
However, this makes it impossible to locate an installation that was build on a different machine.
Could the FindWxWidgets.cmake
script maybe honor also the location of wx-config
(if found) and compute things relative from there?
Or take an extra variable to indicate the root directory (as it does for the Windows part)?
I could also write my own FindWxWidgets.cmake
, but I usually avoid that at all cost