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}) # 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) find_package(assimp REQUIRED) include_directories(${PROJECT_NAME} ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS} ${ASSIMP_INCLUDE_DIRS}) target_link_libraries(${PROJECT_NAME} ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${GLEW_LIBRARIES} ${ASSIMP_LIBRARIES})