CMake: find wxWidgets built with MinGW/MSYS?

2013-08-26T04:22:34

I compiled wxWidgets 2.8.12 using MinGW. To actually do the build I invoked the autotools build files distributed with wxWidgets through the MSYS shell, using an install prefix of H:\MinGW-libs.

The result of this is that I have a Unix style file tree containing my wxWidgets headers and libs (which are .a files, not .dll) with root directory H:\MinGW-libs.

My problem is that I can't get CMake to find the files. When I try to use the "configure" button in the CMake gui it finds other dependencies (namely boost, for which I had to specify BOOST_ROOT, but it does not find wxWidgets. I see that wxWidgets_ROOT_DIR is an available constant that I can set but none of the obvious choices

H:\MinGW-libs (my install prefix for wxWidgets)

H:\MinGW-libs\lib

H:\MinGW-libs\include

fix the error.

There is an old post on the CMake mailing list about this issue but there isn't actually any information indicating how to fix it in this use case. The only hint I have is that there's a difference between looking for wxWidgets in "Unix style" file trees and "Windows style" file trees.

How can I get CMake to find wxWidgets installed in a Unix style file tree on Windows 7? Is there are way to get CMake to use wx-config? I ask this because from the MSYS command line using wx-config to get lib and header locations works just fine.

Copyright License:
Author:「kjoppy」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/18433305/cmake-find-wxwidgets-built-with-mingw-msys

About “CMake: find wxWidgets built with MinGW/MSYS?” questions

I compiled wxWidgets 2.8.12 using MinGW. To actually do the build I invoked the autotools build files distributed with wxWidgets through the MSYS shell, using an install prefix of H:\MinGW-libs. The
I've managed to build a WxWidgets based on CMake on Ubuntu 19.10, but failed on Windows 10, saying that it cannot find WxWidgets, though I've built it successfully (static, release and with unicode
I have searched for this topic and found this and this, but it only seems to either pertain to building wxWidgets or do not contain an answer to my question. I have built the static libs für wxWidg...
Similar questions already exist but I haven't found an answer that works. I need to build a wxWidgets project in Windows using MinGW, I would like to use the cmake command from the command line (I
I am learning GUI programing on Windows, and I choose wxWidgets, Eclipse, MinGW for my learning. I can compile wxWidgets with command: mingw32-make SHELL=CMD.exe -j4 -f makefile.gcc BUILD=release
I'm trying to build a project with statically linked wxWidgets (I would just like to point out that it compiles&links just fine with shared libraries). This is relevant part of my CMakeLists.tx...
I am using VS Code and I want to compile C++ code that use wxWidgets3.2 via cmake. I installed: mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-wxwidgets3.2-msw During cmake configur...
I configured wxWidgets in CMake and built it with MinGW-x64. After building binaries I used the command mingw32-make install (as used in OpenCV) and It was automatically installed with the file
I'm having trouble installing wxWidgets in msys2, I used pacman to install the library pacman -S mingw-w64-clang-x86_64-wxwidgets3.0-msw But when I try to execute a test file it gives me this error
I'm trying to compile this project on Windows using MSYS2 with mingw64, and when running cmake . I get the following output: -- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.16...

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.