Skip to content
Snippets Groups Projects
Select Git revision
  • e9a5875abff4d055060ffd678273cfdbb311c1a5
  • master default protected
2 results

scg3_cmake

CMake Version of scg3

This is a sample Project which includes a CMake verion of the scg3 library.

scg3 original repository

Included libraries

Setup

Run following commands in the library directory (e.g. extern/) to add the library.

git submodule add https://lab.it.hs-hannover.de/3nw-kux-u1/scg3_cmake scg3
git submodule init
git submodule update
git submodule update --init --recursive

Update all submodules: git submodule update --recursive --remote

How to use

Example CMakeLists.txt

cmake_minimum_required(VERSION 3.5)
project(SCG_TEST VERSION 1.0 LANGUAGES CXX)

add_executable(SCG_TEST src/main.cpp)

include_directories(SCG_TEST
        PUBLIC
            include/
        )

target_compile_features(SCG_TEST PRIVATE cxx_auto_type)

#SCG3
add_subdirectory(${PROJECT_SOURCE_DIR}/extern/scg3)

target_link_libraries(SCG_TEST scg3)

Project structure

.
├── CMakeLists.txt
├── extern
│   └── scg3
│       ├── CMakeLists.txt
│       ├──  ...
├── include
│   └── main.h
└── src
    └── main.cpp

Pulling submodules (glfw)

git pull --recurse-submodules

Cleaning

Remove all unversioned files: git clean -d -f -x

Building without an IDE

Prerequsites

  • CMake download
  • any CMake compatible compiler
  • OpenGl 3.2

run cmake ./in project root

Supported IDEs