support Ninja cmake generator on msys2

Add a hack to the root CMakeLists.txt to SET(MSYS ON) for the Ninja
generator when running under msys2, otherwise it cannot find libs.

The quoting fixes from #70 allow all of this to work.
This commit is contained in:
Rafael Kitover 2017-02-11 14:18:38 -08:00
parent 98718f2094
commit 65dae0d0a1
2 changed files with 7 additions and 0 deletions

View File

@ -109,6 +109,11 @@ ELSE()
ADD_DEFINITIONS(-DNDEBUG)
ENDIF()
# hack for ninja in msys2
IF(WIN32 AND CMAKE_GENERATOR STREQUAL Ninja AND (NOT $ENV{MSYSTEM} STREQUAL ""))
SET(MSYS ON)
ENDIF()
# Add support for Homebrew, MacPorts and Fink on OS X
IF(APPLE)
INCLUDE(MacPackageManagers)

View File

@ -24,6 +24,8 @@ make -j10
`./installdeps` is supported on MSys2, Linux (Debian/Ubuntu, Fedora or Arch
Linux) and Mac OS X (homebrew, macports or fink.)
The Ninja cmake generator is also now supported, including on msys2.
If your OS is not supported, you will need the following:
- c++ compiler and binutils