mirror of
https://github.com/GayPizzaSpecifications/padlab.git
synced 2025-08-03 21:21:33 +00:00
Improve drawing with digital zone highligts, futher colour tweaks, & thicker lines in GL.
It's also now no longer possible to trigger NW & SE angles when digital is set to 4 direction.
This commit is contained in:
@ -2,19 +2,25 @@ cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
|
||||
project(padlab C)
|
||||
set(TARGET padlab)
|
||||
|
||||
option(USE_OPENGL "Use legacy OpenGL for drawing" ON)
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
||||
find_package(SDL2 REQUIRED)
|
||||
find_package(OpenGL)
|
||||
if (USE_OPENGL)
|
||||
find_package(OpenGL REQUIRED)
|
||||
endif()
|
||||
|
||||
set(SOURCES
|
||||
maths.h
|
||||
draw.h $<IF:$<BOOL:${OPENGL_FOUND}>,draw_opengl.c,draw.c>
|
||||
draw.h $<IF:$<BOOL:${USE_OPENGL}>,draw_opengl.c,draw.c>
|
||||
stick.c stick.h
|
||||
analogue.c)
|
||||
|
||||
add_executable(${TARGET} ${SOURCES})
|
||||
target_link_libraries(${TARGET}
|
||||
SDL2::SDL2 $<$<BOOL:${OPENGL_FOUND}>:OpenGL::GL> m)
|
||||
SDL2::SDL2 $<$<BOOL:${USE_OPENGL}>:OpenGL::GL> m)
|
||||
target_compile_options(${TARGET} PRIVATE
|
||||
-Wall -Wextra -pedantic -Wno-unused-parameter)
|
||||
target_compile_definitions(${TARGET} PRIVATE
|
||||
$<$<BOOL:${USE_OPENGL}>:USE_OPENGL>)
|
||||
|
Reference in New Issue
Block a user