Skip to content

Commit

Permalink
Fix SDL2 build issue with windows analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
jonesmz committed Oct 30, 2023
1 parent 8be6bfb commit 0155c5e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,17 @@ if(NOT OSP_USE_SYSTEM_SDL)
SET(SDL2_DISABLE_INSTALL ON CACHE BOOL "" FORCE)
SET(SDL2_DISABLE_UNINSTALL ON CACHE BOOL "" FORCE)

# Copied from https://github.com/libsdl-org/SDL/commit/7774de0fe364fa997d58f2faa2199054d37bedf6
#
# CMAKE_PREFIX_PATH and CMAKE_INSTALL_FULL_BINDIR can be a non-absolute path
# when a master-project does e.g. `set(CMAKE_INSTALL_PREFIX "libs/SDL2" CACHE PATH "prefix" FORCE)`.
if(NOT IS_ABSOLUTE "${CMAKE_INSTALL_PREFIX}")
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX}")
endif()
if(NOT IS_ABSOLUTE "${CMAKE_INSTALL_FULL_BINDIR}")
set(CMAKE_INSTALL_FULL_BINDIR "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_FULL_BINDIR}")
endif()

ADD_SUBDIRECTORY(SDL2 EXCLUDE_FROM_ALL)

# Work around macos-13 erroring on -Werror,-Wdeclaration-after-statement
Expand Down

0 comments on commit 0155c5e

Please sign in to comment.