Skip to content

Commit a973163

Browse files
committed
build: Clean up recent expansion of Windows-related platforms
1 parent 3e40561 commit a973163

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/CMakeLists.txt

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,16 @@ include(GNUInstallDirs)
2626

2727
### Dependencies
2828
set(OpenGL_GL_PREFERENCE GLVND)
29-
if (NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
29+
if(NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
3030
# OpenGL package will be found for UWP apps but gl.h excludes UWP apps so it isn't actually usable.
31-
find_package(OpenGL)
31+
find_package(OpenGL)
3232
endif()
3333

3434
if(OPENGL_FOUND)
3535
add_definitions(-DXR_USE_GRAPHICS_API_OPENGL)
3636
message(STATUS "Enabling OpenGL support")
37-
elseif(BUILD_ALL_EXTENSIONS)
38-
if (NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
39-
message(FATAL_ERROR "OpenGL not found")
40-
endif()
37+
elseif(BUILD_ALL_EXTENSIONS AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
38+
message(FATAL_ERROR "OpenGL not found")
4139
endif()
4240

4341
if(NOT CMAKE_VERSION VERSION_LESS 3.7.0)
@@ -91,9 +89,9 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
9189
endif()
9290

9391
# /EHsc (support for C++ exceptions) is default in most configurations but seems missing when building arm/arm64.
94-
IF(MSVC)
95-
SET(CMAKE_CXX_FLAGS "/EHsc")
96-
ENDIF(MSVC)
92+
if(MSVC)
93+
set(CMAKE_CXX_FLAGS "/EHsc ${CMAKE_CXX_FLAGS}")
94+
endif()
9795

9896
# This is a little helper library for setting up OpenGL
9997
if(OPENGL_FOUND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/common/gfxwrapper_opengl.c")

0 commit comments

Comments
 (0)