diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e3e042..709090d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) \ No newline at end of file diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 466b0a4..ecab385 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -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) \ No newline at end of file