fixing SDL2 if can't be found

This commit is contained in:
Noel Berry 2021-04-02 10:56:07 -07:00
parent 0c3cac2d08
commit 14a53c0f3a
2 changed files with 11 additions and 5 deletions

View File

@ -122,11 +122,17 @@ if (PLATFORM_SDL2)
add_subdirectory(${sdl2_SOURCE_DIR} ${sdl2_BINARY_DIR})
endif()
endif()
# statically link SDL2 since we're building it ourselves
set(LIBS ${LIBS} SDL2main SDL2-static)
target_include_directories(blah PUBLIC ${sdl2_SOURCE_DIRS}/include)
# Add Library and Include Dirs
set(LIBS ${LIBS} ${SDL2_LIBRARIES})
target_include_directories(blah PUBLIC ${SDL2_INCLUDE_DIRS})
else()
# Add Library and Include Dirs
set(LIBS ${LIBS} ${SDL2_LIBRARIES})
target_include_directories(blah PUBLIC ${SDL2_INCLUDE_DIRS})
endif()
endif()

View File

@ -32,7 +32,7 @@ typedef float GLfloat; /* single precision float */
typedef float GLclampf; /* single precision float in [0,1] */
typedef double GLdouble; /* double precision float */
typedef double GLclampd; /* double precision float in [0,1] */
typedef char GLchar;
typedef char GLchar;
// OpenGL Constants
#define GL_DONT_CARE 0x1100