Add GLFW in the CMakeLists, and remove all SDL references.

This commit is contained in:
Godzil 2020-11-14 20:14:57 +00:00
parent 02c16b7987
commit 9035a922c3
2 changed files with 9 additions and 4 deletions

View File

@ -8,7 +8,14 @@ project("NewOswan")
include(GetGitRevisionDescription)
git_describe(VERSION --tags --dirty=-dirty)
find_package(SDL 1.2 REQUIRED)
# Include GLFW3
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
add_subdirectory("external/glfw")
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
set(CMAKE_C_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-unused-result -Wno-write-strings -Werror")
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-unused-result -Wno-write-strings -Werror")
@ -21,10 +28,9 @@ set_property(TARGET wonderswan PROPERTY CXX_STANDARD 98)
target_compile_definitions(wonderswan PUBLIC VERSION="${VERSION}")
target_include_directories(wonderswan PUBLIC source)
target_include_directories(wonderswan PUBLIC ${SDL_INCLUDE_DIR})
add_subdirectory(source)
target_link_libraries(wonderswan wswan ${SDL_LIBRARY})
target_link_libraries(wonderswan wswan glfw ${OPENGL_glu_LIBRARY} ${OPENGL_gl_LIBRARY})
add_executable(dumpinfo dumpinfo.c)

View File

@ -6,6 +6,5 @@ add_library(wswan ${SOURCES} ${HEADERS})
target_link_libraries(wswan nec_v30)
target_include_directories(wswan PUBLIC .)
target_include_directories(wswan PUBLIC ${SDL_INCLUDE_DIR})
add_subdirectory(nec)