Skip to content

Commit 8607ac2

Browse files
committed
Merged Alberto Luaces commit "Avoid that mingw cross-compilation choosing X11 as the windowing system" from the OpenSceneGraph-3.6 branch
1 parent 305210c commit 8607ac2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ IF(APPLE)
4242
MESSAGE(STATUS "OSG_OSX_VERSION=${OSG_OSX_VERSION}")
4343
ENDIF()
4444

45+
PROJECT(OpenSceneGraph)
46+
4547
# Set OSX architecture flags here, since they must be specified before
4648
# creating the actual OSG project.
4749
# Note that the CMAKE_OSX_* variables are not well documented in
@@ -52,7 +54,7 @@ ENDIF()
5254

5355
IF(ANDROID)
5456
SET(OSG_WINDOWING_SYSTEM "None" CACHE STRING "Windowing system type for graphics window creation; options: None.")
55-
ELSEIF(WIN32)
57+
ELSEIF(WIN32 OR MINGW)
5658
SET(OSG_WINDOWING_SYSTEM "Win32" CACHE STRING "Windowing system type for graphics window creation; options: Win32 or None.")
5759
ELSEIF(APPLE)
5860
# custom option to flag an iOS build
@@ -120,7 +122,6 @@ ELSE()
120122
SET(OSG_WINDOWING_SYSTEM "X11" CACHE STRING "Windowing system type for graphics window creation; options: X11 or None.")
121123
ENDIF()
122124

123-
PROJECT(OpenSceneGraph)
124125

125126
SET(OPENSCENEGRAPH_VERSION ${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION}.${OPENSCENEGRAPH_PATCH_VERSION})
126127

0 commit comments

Comments
 (0)