Add cglm to project
This commit is contained in:
parent
e3e544214a
commit
8e66150aae
@ -14,6 +14,7 @@ find_package(OpenCL REQUIRED)
|
|||||||
|
|
||||||
|
|
||||||
add_subdirectory(glade)
|
add_subdirectory(glade)
|
||||||
|
add_subdirectory(cglm)
|
||||||
|
|
||||||
include_directories(${GLIB_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ${OPENCL_INCLUDE_DIRS})
|
include_directories(${GLIB_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ${OPENCL_INCLUDE_DIRS})
|
||||||
link_directories(${GLIB_LINK_DIRS} ${GTK3_LINK_DIRS} ${CAIRO_LINK_DIRS})
|
link_directories(${GLIB_LINK_DIRS} ${GTK3_LINK_DIRS} ${CAIRO_LINK_DIRS})
|
||||||
@ -25,9 +26,9 @@ aux_source_directory("src" SOURCES)
|
|||||||
add_compile_options(-Wall)
|
add_compile_options(-Wall)
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} ${SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/glade/resources.c)
|
add_executable(${PROJECT_NAME} ${SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/glade/resources.c)
|
||||||
add_dependencies(${PROJECT_NAME} glib-resources)
|
add_dependencies(${PROJECT_NAME} glib-resources cglm)
|
||||||
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/glade/resources.c PROPERTIES GENERATED 1)
|
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/glade/resources.c PROPERTIES GENERATED 1)
|
||||||
target_link_libraries(${PROJECT_NAME} ${GLIB_LDFLAGS} ${GTK3_LDFLAGS} ${CAIRO_LDFLAGS} m pthread ${OPENCL_LIBRARIES} epoxy)
|
target_link_libraries(${PROJECT_NAME} ${GLIB_LDFLAGS} ${GTK3_LDFLAGS} ${CAIRO_LDFLAGS} m pthread ${OPENCL_LIBRARIES} epoxy cglm)
|
||||||
install (TARGETS ${PROJECT_NAME} DESTINATION bin)
|
install (TARGETS ${PROJECT_NAME} DESTINATION bin)
|
||||||
|
|
||||||
message(STATUS "OpenCL found: ${OPENCL_FOUND}")
|
message(STATUS "OpenCL found: ${OPENCL_FOUND}")
|
||||||
|
14
cglm/CMakeLists.txt
Normal file
14
cglm/CMakeLists.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
project(cglm)
|
||||||
|
cmake_minimum_required(VERSION 2.8)
|
||||||
|
|
||||||
|
include_directories(${GLIB_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ${OPENCL_INCLUDE_DIRS})
|
||||||
|
link_directories(${GLIB_LINK_DIRS} ${GTK3_LINK_DIRS} ${CAIRO_LINK_DIRS})
|
||||||
|
add_definitions(${GLIB2_CFLAGS_OTHER})
|
||||||
|
|
||||||
|
aux_source_directory("cglm/src" SOURCES)
|
||||||
|
add_library(${PROJECT_NAME} STATIC ${SOURCES})
|
||||||
|
add_compile_options(-Wall -std=gnu99 -O3 -Wstrict-aliasing=2 -fstrict-aliasing -pedantic)
|
||||||
|
target_include_directories(${PROJECT_NAME} PUBLIC "cglm/include")
|
||||||
|
|
||||||
|
target_link_libraries(${PROJECT_NAME} m)
|
||||||
|
|
@ -7,6 +7,7 @@
|
|||||||
#include <epoxy/gl.h>
|
#include <epoxy/gl.h>
|
||||||
#include <epoxy/glx.h>
|
#include <epoxy/glx.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <cglm/call.h>
|
||||||
|
|
||||||
static const char * const vertex_shader = "#version 330 core\n \
|
static const char * const vertex_shader = "#version 330 core\n \
|
||||||
layout (location = 0) in vec3 aPos;\n \
|
layout (location = 0) in vec3 aPos;\n \
|
||||||
|
Loading…
Reference in New Issue
Block a user