Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/viewer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
29 changes: 29 additions & 0 deletions examples/viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# cmake -S . -B build && cmake --build build && build/app

# cmake -S . -B build -G "Ninja" && cmake --build build && build/app
# cmake -S . -B build -G "CodeBlocks - Ninja" && cmake --build build && build/app
# cmake -S . -B build -G "Visual Studio 17 2022" && cmake --build build && build/app

cmake_minimum_required(VERSION 3.18)
project( app VERSION 0.1 )

file(GLOB SOURCE_FILES "*.c*" )
add_executable(app ${SOURCE_FILES})

find_package( OpenGL REQUIRED )
find_package( glfw3 REQUIRED )

set(ADDITIONAL_LIBRARIES "")
if(WIN32)
set(ADDITIONAL_LIBRARIES winmm)
endif()

set(GLEW_LIBRARY "")
if(UNIX)
set(GLEW_LIBRARY GLEW)
else()
find_package( glew REQUIRED )
set(GLEW_LIBRARY GLEW::glew)
endif()

target_link_libraries(${PROJECT_NAME} OpenGL::GL OpenGL::GLU glfw ${ADDITIONAL_LIBRARIES} ${GLEW_LIBRARY} )