Skip to content

Commit

Permalink
adjust cmake format, provide nsis graphics, prepare next patch
Browse files Browse the repository at this point in the history
  • Loading branch information
cgcostume committed Nov 1, 2014
1 parent f11a8fb commit fc40202
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 19 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set(META_PROJECT_NAME "glbinding")
set(META_PROJECT_DESCRIPTION "OpenGL C++ Binding")
set(META_VERSION_MAJOR "1")
set(META_VERSION_MINOR "0")
set(META_VERSION_PATCH "2")
set(META_VERSION_PATCH "3")
set(META_VERSION "${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH}")
set(META_AUTHOR_ORGANIZATION "hpicgs group")
set(META_AUTHOR_DOMAIN "https://github.com/hpicgs/glbinding")
Expand Down
Binary file added packages/nsis.bmp
Binary file not shown.
1 change: 1 addition & 0 deletions packages/pack-glbinding.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
get_filename_component(CPACK_PATH ${CMAKE_COMMAND} PATH)
set(CPACK_COMMAND "${CPACK_PATH}/cpack")


# Package project

set(project_name ${META_PROJECT_NAME}) # Name of package project
Expand Down
Binary file added packages/win.bmp
Binary file not shown.
21 changes: 7 additions & 14 deletions source/examples/callbacks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@

set(target callbacks)

#

# External libraries
#

find_package(OpenGL REQUIRED)
find_package(GLFW QUIET)
Expand All @@ -15,9 +14,8 @@ endif()

message(STATUS "Example ${target}")

#

# Includes
#

include_directories(
${OPENGL_INCLUDE_DIR}
Expand All @@ -30,27 +28,24 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
)

#

# Libraries
#

set(libs
${OPENGL_LIBRARIES}
${GLFW_LIBRARY}
glbinding
)

#

# Compiler definitions
#

if (OPTION_BUILD_STATIC)
add_definitions("-DGLBINDING_STATIC")
endif()

#

# Sources
#

set(comparison_path ../comparison)

Expand All @@ -61,9 +56,8 @@ set(sources
${comparison_path}/gltest_data.inl
)

#

# Build executable
#

add_executable(${target} ${sources})

Expand All @@ -80,9 +74,8 @@ set_target_properties(${target}
LINK_FLAGS_RELEASE "${DEFAULT_LINKER_FLAGS_RELEASE}"
DEBUG_POSTFIX "d${DEBUG_POSTFIX}")

#

# Deployment
#

install(TARGETS ${target} COMPONENT examples
RUNTIME DESTINATION ${INSTALL_EXAMPLES}
Expand Down
7 changes: 7 additions & 0 deletions source/examples/comparison/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

set(target comparison)


# External libraries

find_package(OpenGL REQUIRED)
Expand All @@ -19,6 +20,7 @@ endif()

message(STATUS "Example ${target}")


# Includes

include_directories(
Expand All @@ -33,6 +35,7 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
)


# Libraries

set(libs
Expand All @@ -42,12 +45,14 @@ set(libs
glbinding
)


# Compiler definitions

if (OPTION_BUILD_STATIC)
add_definitions("-DGLBINDING_STATIC")
endif()


# Sources

set(sources
Expand All @@ -66,6 +71,7 @@ set(sources
Timer.h
)


# Build executable

add_executable(${target} ${sources})
Expand All @@ -83,6 +89,7 @@ set_target_properties(${target}
LINK_FLAGS_RELEASE "${DEFAULT_LINKER_FLAGS_RELEASE}"
DEBUG_POSTFIX "d${DEBUG_POSTFIX}")


# Deployment

install(TARGETS ${target} COMPONENT examples
Expand Down
9 changes: 9 additions & 0 deletions source/examples/cubescape-qt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

set(target cubescape-qt)


# Qt5

# good resource: http://www.kdab.com/using-cmake-with-qt-5/
Expand All @@ -10,6 +11,7 @@ if(MSVC)
cmake_policy(SET CMP0020 NEW)
endif()


# External libraries

find_package(Qt5OpenGL 5.1 QUIET)
Expand All @@ -31,6 +33,7 @@ set(AUTOMOC_MOC_OPTIONS PROPERTIES FOLDER CMakeAutomocTargets)
# What we do not want is automocs beside the project -> http://www.cmake.org/Bug/view.php?id=13688
set_property(GLOBAL PROPERTY AUTOMOC_FOLDER CMakeAutomocTargets)


# Includes

include_directories(
Expand All @@ -44,18 +47,21 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}
)


# Libraries

set(libs
glbinding
)


# Compiler definitions

if (OPTION_BUILD_STATIC)
add_definitions("-DGLBINDING_STATIC")
endif()


# Sources

set(cubscape_path ../cubescape)
Expand All @@ -82,10 +88,12 @@ set(uis
Viewer.ui
)


# UI Files

qt5_wrap_ui(compiled_ui_files ${uis})


# Build executable

add_executable(${target} ${sources} ${compiled_ui_files})
Expand All @@ -107,6 +115,7 @@ set_target_properties(${target}
LINK_FLAGS_RELEASE "${DEFAULT_LINKER_FLAGS_RELEASE}"
DEBUG_POSTFIX "d${DEBUG_POSTFIX}")


# Deployment

install(TARGETS ${target} COMPONENT examples
Expand Down
7 changes: 7 additions & 0 deletions source/examples/cubescape/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

set(target cubescape)


# External libraries

find_package(OpenGL REQUIRED)
Expand All @@ -13,6 +14,7 @@ endif()

message(STATUS "Example ${target}")


# Includes

include_directories(
Expand All @@ -26,6 +28,7 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
)


# Libraries

set(libs
Expand All @@ -34,12 +37,14 @@ set(libs
glbinding
)


# Compiler definitions

if (OPTION_BUILD_STATIC)
add_definitions("-DGLBINDING_STATIC")
endif()


# Sources

set(sources
Expand All @@ -52,6 +57,7 @@ set(sources
RawFile.h
)


# Build executable

add_executable(${target} ${sources})
Expand All @@ -69,6 +75,7 @@ set_target_properties(${target}
LINK_FLAGS_RELEASE "${DEFAULT_LINKER_FLAGS_RELEASE}"
DEBUG_POSTFIX "d${DEBUG_POSTFIX}")


# Deployment

install(TARGETS ${target} COMPONENT examples
Expand Down
7 changes: 7 additions & 0 deletions source/examples/functions/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

set(target functions)


# External libraries

find_package(OpenGL REQUIRED)
Expand All @@ -13,6 +14,7 @@ endif()

message(STATUS "Example ${target}")


# Includes

include_directories(
Expand All @@ -26,6 +28,7 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
)


# Libraries

set(libs
Expand All @@ -34,18 +37,21 @@ set(libs
glbinding
)


# Compiler definitions

if (OPTION_BUILD_STATIC)
add_definitions("-DGLBINDING_STATIC")
endif()


# Sources

set(sources
main.cpp
)


# Build executable

add_executable(${target} ${sources})
Expand All @@ -63,6 +69,7 @@ set_target_properties(${target}
LINK_FLAGS_RELEASE "${DEFAULT_LINKER_FLAGS_RELEASE}"
DEBUG_POSTFIX "d${DEBUG_POSTFIX}")


# Deployment

install(TARGETS ${target} COMPONENT examples
Expand Down
7 changes: 7 additions & 0 deletions source/examples/meta/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
set(target meta)
message(STATUS "Example ${target}")


# External libraries

find_package(OpenGL REQUIRED)


# Includes

include_directories(
Expand All @@ -18,13 +20,15 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
)


# Libraries

set(libs
${OPENGL_LIBRARIES}
glbinding
)


# Compiler definitions

if (OPTION_BUILD_STATIC)
Expand All @@ -38,12 +42,14 @@ if (OPTION_GL_BY_STRINGS)
add_definitions("-DGL_BY_STRINGS")
endif()


# Sources

set(sources
main.cpp
)


# Build executable

add_executable(${target} ${sources})
Expand All @@ -61,6 +67,7 @@ set_target_properties(${target}
LINK_FLAGS_RELEASE "${DEFAULT_LINKER_FLAGS_RELEASE}"
DEBUG_POSTFIX "d${DEBUG_POSTFIX}")


# Deployment

install(TARGETS ${target} COMPONENT examples
Expand Down
Loading

0 comments on commit fc40202

Please sign in to comment.