... | ... |
@@ -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 |
+) |