2023-10-10 21:33:10 +00:00
|
|
|
cmake_minimum_required(VERSION 3.25)
|
|
|
|
project(ssts C)
|
|
|
|
|
2023-10-11 20:25:22 +00:00
|
|
|
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/")
|
|
|
|
|
|
|
|
find_package(OpenGL REQUIRED)
|
|
|
|
find_package(GLUT REQUIRED)
|
|
|
|
find_package(GLEW REQUIRED)
|
2023-10-11 20:25:22 +00:00
|
|
|
find_package(assimp REQUIRED)
|
2023-10-10 21:33:10 +00:00
|
|
|
|
2023-10-11 20:25:22 +00:00
|
|
|
include_directories(${PROJECT_NAME} ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS} ${ASSIMP_INCLUDE_DIRS})
|
2023-10-10 21:33:10 +00:00
|
|
|
|
2023-10-11 20:25:22 +00:00
|
|
|
target_link_libraries(${PROJECT_NAME} ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${GLEW_LIBRARIES} ${ASSIMP_LIBRARIES})
|