mirror of
https://github.com/GayPizzaSpecifications/padlab.git
synced 2025-08-03 21:21:33 +00:00
Fix glibc build & other Linux warnings
This commit is contained in:
@ -5,14 +5,18 @@ set(TARGET padlab)
|
||||
option(USE_OPENGL "Use legacy OpenGL for drawing" ON)
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
if (C_COMPILER_ID IN_LIST "GNU;Clang;AppleClang")
|
||||
set(GNU)
|
||||
set(GNU_COMPILERS GNU Clang AppleClang)
|
||||
if (CMAKE_C_COMPILER_ID IN_LIST GNU_COMPILERS)
|
||||
set(GNU 1)
|
||||
elseif (MSVC)
|
||||
string(REPLACE "/W3" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
endif()
|
||||
|
||||
find_package(SDL2 REQUIRED)
|
||||
if (USE_OPENGL)
|
||||
if (NOT DEFINED OpenGL_GL_PREFERENCE)
|
||||
set(OpenGL_GL_PREFERENCE "GLVND")
|
||||
endif()
|
||||
find_package(OpenGL REQUIRED)
|
||||
endif()
|
||||
|
||||
|
Reference in New Issue
Block a user