feat(build): UBsan can be enabled or disabled with WHOA_UB_SAN. GLSDL can be toggled with WHOA_BUILD_GLSDL

This commit is contained in:
phaneron 2024-07-21 20:04:32 -04:00
parent c2a86dd72c
commit d067eb1ae2
3 changed files with 34 additions and 8 deletions

View file

@ -19,8 +19,8 @@ if(WHOA_SYSTEM_MAC)
list(APPEND GX_SOURCES ${GLL_SOURCES})
endif()
# Build OpenGL/SDL graphics device on Windows and Linux
if(WHOA_SYSTEM_WIN OR WHOA_SYSTEM_LINUX)
# Build OpenGL/SDL graphics device if enabled
if(WHOA_BUILD_GLSDL)
file(GLOB GLSDL_SOURCES "glsdl/*.cpp")
list(APPEND GX_SOURCES ${GLSDL_SOURCES})
endif()
@ -53,8 +53,8 @@ if(WHOA_SYSTEM_WIN)
)
endif()
# Link SDL3 and GLEW for Windows and Linux
if (WHOA_SYSTEM_WIN OR WHOA_SYSTEM_LINUX)
# Link SDL2 and GLEW for GLSDL
if (WHOA_BUILD_GLSDL)
target_link_libraries(gx
PRIVATE
SDL2::SDL2-static