From 5203c914616f2efc41d12e5e1a347c8b32dd9a9f Mon Sep 17 00:00:00 2001 From: Joseph Walton-Rivers <joseph@walton-rivers.uk> Date: Sun, 5 Sep 2021 11:19:24 +0100 Subject: [PATCH] cleanup opengl import - confine to gfx module --- CMakeLists.txt | 7 ++++--- fggl/CMakeLists.txt | 2 +- fggl/gfx/CMakeLists.txt | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 58ace32..33c0c70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.13) project(FGGL VERSION 0.1 LANGUAGES CXX) @@ -13,8 +13,9 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) find_package( glfw3 ) if ( NOT glfw3_FOUND ) include(FetchContent) - set(GLFW_BUILD_EXAMPLES OFF) - set(GLFW_BUILD_TESTS OFF) + set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE) + set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE) + set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) if ( FGGL_WAYLAND ) set(GLFW_USE_WAYLAND True) endif () diff --git a/fggl/CMakeLists.txt b/fggl/CMakeLists.txt index f639ed7..18467d1 100644 --- a/fggl/CMakeLists.txt +++ b/fggl/CMakeLists.txt @@ -14,7 +14,7 @@ target_include_directories(fggl PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../) # Graphics backend add_subdirectory(gfx) -target_link_libraries(fggl glfw ${OPENGL_gl_LIBRARY} GLEW) +target_link_libraries(fggl glfw) # Debug backend add_subdirectory(debug) diff --git a/fggl/gfx/CMakeLists.txt b/fggl/gfx/CMakeLists.txt index 2db2c70..d2ff4af 100644 --- a/fggl/gfx/CMakeLists.txt +++ b/fggl/gfx/CMakeLists.txt @@ -2,6 +2,7 @@ # OpenGL Backend find_package( OpenGL REQUIRED ) include_directories( ${OPENGL_INCLUDE_DIR} ) +target_link_libraries(fggl OpenGL::OpenGL GLEW) # GLEW find_package( GLEW REQUIRED ) -- GitLab