cmake_minimum_required(VERSION 3.5)

project(base-project)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(OpenGL REQUIRED)
add_executable(
    ${PROJECT_NAME}
    main.cpp
    camera.h
    sensor.h
    glad.c
)

target_link_libraries(
    ${PROJECT_NAME}
    PRIVATE
    libglfw3.a
    ${OPENGL_LIBRARIES}
)

if (WIN32)
    target_link_libraries(
        ${PROJECT_NAME}
        PRIVATE
        opengl32
        gdi32
        user32
        shell32
        winmm
    )
else()
    find_package(X11 REQUIRED)
    target_link_libraries(
        ${PROJECT_NAME}
        PRIVATE
        ${X11_LIBRARIES}
        GL
        Xrandr
        Xi
        Xinerama
        Xcursor
        pthread
        dl
    )
endif()
