39 lines
1.1 KiB
CMake
39 lines
1.1 KiB
CMake
cmake_minimum_required(VERSION 3.26)
|
|
project(zadanie_2_new)
|
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
|
|
# Find necessary packages
|
|
find_package(OpenGL REQUIRED)
|
|
find_package(glfw3 REQUIRED)
|
|
find_package(glm REQUIRED)
|
|
|
|
# Include directories for the found packages
|
|
include_directories(${OPENGL_INCLUDE_DIRS} ${GLM_INCLUDE_DIRS} /usr/local/Cellar/glew/2.2.0_1/include)
|
|
|
|
# Ścieżka do katalogu z biblioteką imgui
|
|
set(IMGUI_DIR ${CMAKE_SOURCE_DIR}/libraries/imgui)
|
|
|
|
# Dodaj pliki źródłowe imgui do kompilacji
|
|
set(IMGUI_SOURCES
|
|
${IMGUI_DIR}/imgui.cpp
|
|
${IMGUI_DIR}/imgui_draw.cpp
|
|
${IMGUI_DIR}/imgui_widgets.cpp
|
|
${IMGUI_DIR}/imgui_tables.cpp
|
|
${IMGUI_DIR}/imgui_demo.cpp
|
|
${IMGUI_DIR}/imgui_impl_glfw.cpp
|
|
${IMGUI_DIR}/imgui_impl_opengl3.cpp
|
|
)
|
|
|
|
# Include directories for imgui
|
|
include_directories(${IMGUI_DIR})
|
|
|
|
# Add executable and link libraries
|
|
add_executable(zadanie_2_new main.cpp shader.h shader.cpp ${IMGUI_SOURCES})
|
|
|
|
# Link libraries
|
|
target_link_libraries(zadanie_2_new OpenGL::GL glfw glm::glm)
|
|
|
|
# Link GLEW library directly
|
|
target_link_libraries(zadanie_2_new /usr/local/Cellar/glew/2.2.0_1/lib/libGLEW.dylib)
|