Extra generators do not support MSYS Makefiles.
MSYS2 is a common way to install c/c++ libraries and build c/c++ code on windows. It installs libraries package style using pacman and allows Unix like package management on windows. CMake's find_package often searches for packages in different ways on windows than it does on Unix systems.
For example, FindwxWidgets uses the wx-config utility on Unix systems, but manually searches for the libraries on windows based on the WXWIN environment variable. When installed with MSYS2 wxWidgets uses wx-config. As a result, it is necessary to use the MSYS Makefile generator which is treated as a Unix system by CMake and uses wx-config (neither the Unix Makefiles generator nor the MinGW Makefiles generator are treated as Unix systems by FindwxWidgets).
Unix Makefiles:
$ cmake .. -G"Unix Makefiles" -- The C compiler identification is GNU 7.2.0 -- The CXX compiler identification is GNU 7.2.0 -- Check for working C compiler: C:/msys64/mingw64/bin/cc.exe -- Check for working C compiler: C:/msys64/mingw64/bin/cc.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: C:/msys64/mingw64/bin/c++.exe -- Check for working CXX compiler: C:/msys64/mingw64/bin/c++.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at C:/msys64/mingw64/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES wxWidgets_INCLUDE_DIRS) Call Stack (most recent call first): C:/msys64/mingw64/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) C:/msys64/mingw64/share/cmake-3.11/Modules/FindwxWidgets.cmake:953 (find_package_handle_standard_args) wxCalc/CMakeLists.txt:4 (find_package) -- Configuring incomplete, errors occurred!
MSYS Makefiles:
$ cmake .. -G"MSYS Makefiles" -- The C compiler identification is GNU 7.2.0 -- The CXX compiler identification is GNU 7.2.0 -- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe -- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: C:/msys64/mingw64/bin/g++.exe -- Check for working CXX compiler: C:/msys64/mingw64/bin/g++.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found wxWidgets: -LC:/msys64/mingw64/lib;;;-pipe;-Wl,--subsystem,windows;-mwindows;-lwx_mswu_core-3.1;-lwx_baseu-3.1 (found version "3.1.1") -- wxLibs: -LC:/msys64/mingw64/lib;;;-pipe;-Wl,--subsystem,windows;-mwindows;-lwx_mswu_core-3.1;-lwx_baseu-3.1 -- Configuring done -- Generating done
MSYS Makefiles is not an option when generating projects for Eclipse CDT4, CodeLite, or CodeBlocks. When Unix Makefiles (or MinGW Makefiles) are used with the Eclipse CDT4, CodeLite, and CodeClocks generators the windows search style is used and libraries are not found. In order to generate functional projects for Eclipse, CodeLite, or CodeBlocks a it is necessary to manually set MSYS to true when invoking cmake.
cmake .. -G"Eclipse CDT4 - Unix Makefiles" -DMSYS=TRUE
This works, but it should not be necessary to define MSYS manually. I am also unsure if this workaround does everything MSYS Makefiles does. If not, there could be other issues with more complex projects than the one I tested this with.