From 2dcf79566f19e99ee3365de5c8b435d7a3b775e9 Mon Sep 17 00:00:00 2001 From: Tan Meng Yue Date: Wed, 5 Dec 2018 23:56:23 +1100 Subject: [PATCH] Add CMake configuration for glview So that we can build more of the examples consistently with CMake --- examples/glview/CMakeLists.txt | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 examples/glview/CMakeLists.txt diff --git a/examples/glview/CMakeLists.txt b/examples/glview/CMakeLists.txt new file mode 100644 index 0000000..4d40557 --- /dev/null +++ b/examples/glview/CMakeLists.txt @@ -0,0 +1,34 @@ +cmake_minimum_required(VERSION 3.6) +project(glview) + +find_package ( GLEW REQUIRED ) +find_package ( OpenGL REQUIRED ) + +find_library(COCOA_LIBRARY Cocoa) +find_library(COREVIDEO_LIBRARY CoreVideo) +find_library(IOKIT_LIBRARY IOKit) + +set(CMAKE_CXX_STANDARD 11) + +include_directories( + ../../ + ../common + # ${OPENGL_INCLUDE_DIR} + ${GLEW_INCLUDE_DIR} + ${GLFW_INCLUDE_DIR} + ) + +add_executable(glview + glview.cc + ../common/trackball.cc + ) + +target_link_libraries ( glview + ${GLEW_LIBRARY} + ${GLFW_LIBRARY} + ${OPENGL_gl_LIBRARY} + ${OPENGL_glu_LIBRARY} + ${COCOA_LIBRARY} + ${COREVIDEO_LIBRARY} + ${IOKIT_LIBRARY} + )