From eccfbc8a8040c3a07907ab201ee3f0fc54b3513b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Wed, 24 Jun 2020 22:43:20 +0200 Subject: [PATCH] Add lib for opengl classes --- CMakeLists.txt | 1 + shimatta-opengl/CMakeLists.txt | 17 +++++++++++++++++ .../include/shimatta-opengl-program.h | 0 shimatta-opengl/src/shimatta-opengl-program.c | 0 4 files changed, 18 insertions(+) create mode 100644 shimatta-opengl/CMakeLists.txt create mode 100644 shimatta-opengl/include/shimatta-opengl-program.h create mode 100644 shimatta-opengl/src/shimatta-opengl-program.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 516c06c..4e07dd9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,3 +3,4 @@ project(gtk-graph-view-dev) add_subdirectory(lib) add_subdirectory(app) +add_subdirectory(shimatta-opengl) diff --git a/shimatta-opengl/CMakeLists.txt b/shimatta-opengl/CMakeLists.txt new file mode 100644 index 0000000..67e388a --- /dev/null +++ b/shimatta-opengl/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.5) +project(shimatta-opengl LANGUAGES C) + +find_package(PkgConfig REQUIRED) +pkg_search_module(GLIB REQUIRED glib-2.0) +pkg_check_modules(EPOXY REQUIRED epoxy) + +add_compile_options(-Wall -Wextra -Wold-style-declaration -Wuninitialized -Wmaybe-uninitialized -Wunused-parameter) +aux_source_directory("src" SRC_DIR) + +add_library(${PROJECT_NAME} SHARED ${SRC_DIR}) +target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) +target_include_directories(${PROJECT_NAME} PRIVATE ${EPOXY_INCLUDE_DIRS}) +target_link_libraries(${PROJECT_NAME} PUBLIC ${GLIB_LDFLAGS} ${EPOXY_LDFLAGS}) +target_link_directories(${PROJECT_NAME} PUBLIC ${GLIB_LINK_DIRS} ${EPOXY_LINK_DIRS}) +target_include_directories(${PROJECT_NAME} PUBLIC ${GLIB_INCLUDE_DIRS}) + diff --git a/shimatta-opengl/include/shimatta-opengl-program.h b/shimatta-opengl/include/shimatta-opengl-program.h new file mode 100644 index 0000000..e69de29 diff --git a/shimatta-opengl/src/shimatta-opengl-program.c b/shimatta-opengl/src/shimatta-opengl-program.c new file mode 100644 index 0000000..e69de29