From 117fd42efccb6943803500683f56c573988395fa Mon Sep 17 00:00:00 2001 From: Alberto Luaces Date: Tue, 16 Jul 2019 11:08:25 +0200 Subject: [PATCH] Avoid that mingw cross-compilation choosing X11 as the windowing system. I have moved the PROJECT stanza before the conditionals, because otherwise expressions like IF(MINGW) always fail. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 930bb1ac6..4596651d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,8 @@ IF(APPLE) OSG_OSX_VERSION "${OSG_OSX_VERSION}") ENDIF() +PROJECT(OpenSceneGraph) + # Set OSX architecture flags here, since they must be specified before # creating the actual OSG project. # Note that the CMAKE_OSX_* variables are not well documented in @@ -51,7 +53,7 @@ ENDIF() IF(ANDROID) SET(OSG_WINDOWING_SYSTEM "None" CACHE STRING "Windowing system type for graphics window creation; options: None.") -ELSEIF(WIN32) +ELSEIF(WIN32 OR MINGW) SET(OSG_WINDOWING_SYSTEM "Win32" CACHE STRING "Windowing system type for graphics window creation; options: Win32 or None.") ELSEIF(APPLE) # custom option to flag an iOS build @@ -116,8 +118,6 @@ ELSE() ENDIF() -PROJECT(OpenSceneGraph) - SET(OPENSCENEGRAPH_VERSION ${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION}.${OPENSCENEGRAPH_PATCH_VERSION}) SET(OSG_PLUGINS osgPlugins-${OPENSCENEGRAPH_VERSION})