Skip to content

Commit 476ffa2

Browse files
committed
Push initial project code
1 parent 1fe408d commit 476ffa2

File tree

183 files changed

+1087539
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+1087539
-3
lines changed

CMakeLists.txt

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
project(glpp)
2+
cmake_minimum_required(VERSION 2.8.5)
3+
4+
# put our custom modules into cmake's search path
5+
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
6+
7+
# options
8+
option(BUILD_EXAMPLES "Build glpp examples." ON)
9+
option(FORCE_CXX11 "Force C++11 standard." OFF)
10+
11+
# find dependencies
12+
include(MacroLogFeature)
13+
include(GNUInstallDirs)
14+
15+
find_package(OpenGL)
16+
macro_log_feature(OPENGL_FOUND "OpenGL" "Required to build glpp" "http://www.opengl.org" TRUE)
17+
18+
find_package(GLUT)
19+
macro_log_feature(GLUT_FOUND "FreeGLUT" "Required to build glpp" "http://freeglut.sourceforge.net/" TRUE)
20+
21+
find_package(GLEW)
22+
macro_log_feature(GLEW_FOUND "GLEW" "Required to build glpp" "http://glew.sourceforge.net/" TRUE)
23+
24+
find_package(GLM)
25+
macro_log_feature(GLM_FOUND "GLM" "Required to build examples" "http://glm.g-truc.net/" FALSE)
26+
27+
find_package(FreeImage)
28+
macro_log_feature(FREEIMAGE_FOUND "FreeImage" "Required for the examples" "http://freeimage.sourceforge.net/" FALSE)
29+
30+
find_package(Boost)
31+
macro_log_feature(Boost_FOUND "Boost" "Required for the examples" "http://www.boost.org/" FALSE)
32+
33+
find_package(Assimp)
34+
macro_log_feature(ASSIMP_FOUND "Assimp" "Required for the examples" "http://assimp.sourceforge.net/" FALSE)
35+
36+
# common flags for all the project
37+
if (CMAKE_COMPILER_IS_GNUCXX)
38+
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE CXX_VERSION)
39+
if (CXX_VERSION VERSION_GREATER 4.6 OR CXX_VERSION VERSION_EQUAL 4.6)
40+
message(STATUS "GCC Version >= 4.6, enabling C++11")
41+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
42+
endif()
43+
endif()
44+
45+
if (FORCE_CXX11)
46+
add_definitions(-DGLPP_FORCE_CXX11)
47+
endif()
48+
49+
if(NOT WIN32)
50+
add_definitions(-fPIC)
51+
endif()
52+
53+
include_directories(
54+
${CMAKE_CURRENT_SOURCE_DIR}/src
55+
${OPENGL_INCLUDE_DIR}
56+
${GLUT_INCLUDE_DIR}
57+
${GLEW_INCLUDE_DIR}
58+
)
59+
60+
add_subdirectory(src)
61+
62+
if (BUILD_EXAMPLES)
63+
add_subdirectory(examples)
64+
endif()
65+
66+
macro_display_feature_log()

CODING

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
3+
1. Coding style
4+
----------------------------------------------------------------------------
5+
6+
* All classes and functions are lower case splited by underscore.
7+
8+
* If a function returns a non-parameter(property) it is not suffixed with set/get
9+
* If a functions controls a property it must be suffixed with set/get.
10+
* Functions returning a boolean state should be prefixed with is_...()

0 commit comments

Comments
 (0)