cmake_minimum_required(VERSION 3.22)
project(perlin-shadows)

set(CMAKE_CXX_STANDARD 23)

include_directories(src)

link_libraries(-lGL -lglut -lGLEW -lGLU)

add_executable(perlin-shadows
        src/constants.h
        src/final.cpp
        src/geography.cpp
        src/geography.h
        src/grid.cpp
        src/grid.h
        src/noise_math.h
        src/renderer.cpp
        src/renderer.h
        src/camera.cpp
        src/camera.h
        src/shader.cpp
        src/shader.h
        src/point_light.cpp
        src/point_light.h
        src/renderable.cpp
        src/renderable.h
)

file(READ src/shader/phong.vert PHONG_VERT)
file(READ src/shader/phong.frag PHONG_FRAG)
configure_file(src/renderer.in.cpp src/renderer.cpp @ONLY)

file(READ src/shader/shadow.vert SHADOW_VERT)
file(READ src/shader/shadow.frag SHADOW_FRAG)
file(READ src/shader/shadow.geom SHADOW_GEOM)
configure_file(src/point_light.in.h src/point_light.h @ONLY)

target_include_directories(perlin-shadows PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/src")
