gravity/CMakeLists.txt

25 lines
936 B
CMake
Raw Normal View History

2023-10-10 21:33:10 +00:00
cmake_minimum_required(VERSION 3.25)
project(ssts C)
set(SOURCE_FILES main.c)
set(HEADER_FILES )
set(SHADER_FILES shader.vert shader.frag)
foreach(SHADER IN LISTS SHADER_FILES)
configure_file(${SHADER} ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
endforeach()
add_executable(${PROJECT_NAME} ${HEADER_FILES} ${SOURCE_FILES} ${SHADER_FILES})
2023-10-10 21:33:10 +00:00
# We need a CMAKE_DIR with some code to find external dependencies
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
2023-10-14 16:24:51 +00:00
find_package(PkgConfig REQUIRED)
2023-10-10 21:33:10 +00:00
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
find_package(GLEW REQUIRED)
find_package(assimp REQUIRED)
2023-10-14 16:24:51 +00:00
find_package(cglm REQUIRED)
2023-10-10 21:33:10 +00:00
2023-10-14 16:24:51 +00:00
include_directories(${PROJECT_NAME} ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS} ${ASSIMP_INCLUDE_DIRS} ${CGLM_INCLUDE_DIRS})
2023-10-10 21:33:10 +00:00
2023-10-14 16:24:51 +00:00
target_link_libraries(${PROJECT_NAME} ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${GLEW_LIBRARIES} ${ASSIMP_LIBRARIES} ${CGLM_LIBRARIES} m)