Browse code

Add implementation

Robert Cranston authored on 14/10/2022 20:41:19
Showing 1 changed files
... ...
@@ -9,3 +9,30 @@ project(glbase
9 9
     VERSION 1.0.0
10 10
     LANGUAGES CXX
11 11
 )
12
+
13
+## Main target
14
+add_library(${PROJECT_NAME})
15
+
16
+## Variables
17
+if(NOT GLBASE_INCLUDE)
18
+    set(GLBASE_PACKAGES GLEW       OpenGL)
19
+    set(GLBASE_TARGETS  GLEW::GLEW OpenGL::GL)
20
+    set(GLBASE_INCLUDE  <GL/glew.h>)
21
+endif()
22
+
23
+## Common
24
+include(common.cmake)
25
+common(
26
+    CXX_STANDARD 11
27
+    DISABLE_CPPCHECK # function try block
28
+    PACKAGES
29
+        ${GLBASE_PACKAGES}
30
+    FETCHCONTENT
31
+        https://git.rcrnstn.net/rcrnstn/cxx-str
32
+    DEPENDENCIES_PUBLIC
33
+        ${GLBASE_TARGETS}
34
+    DEPENDENCIES_PRIVATE
35
+        cxx-str
36
+    DEFINITIONS
37
+        GLBASE_INCLUDE=${GLBASE_INCLUDE}
38
+)
Browse code

Add project

Robert Cranston authored on 14/10/2022 19:47:51
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,11 @@
1
+## CMake
2
+cmake_minimum_required(VERSION 3.14)
3
+if(NOT CMAKE_BUILD_TYPE)
4
+    set(CMAKE_BUILD_TYPE Debug)
5
+endif()
6
+
7
+## Project
8
+project(glbase
9
+    VERSION 1.0.0
10
+    LANGUAGES CXX
11
+)