This repository has been archived on 2024-12-30. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
2024CG-project-render/CMakeLists.txt
github-classroom[bot] 5985bb8445
Initial commit
2024-10-24 10:26:51 +00:00

34 lines
856 B
CMake

cmake_minimum_required(VERSION 3.0)
project(meshes)
set(CMAKE_CXX_STANDARD 11)
list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# Libigl
include(libigl)
# Enable the target igl::glfw and igl::stb
igl_include(glfw)
igl_include(stb)
# include the header files
include_directories(include/)
# add the source files
file(GLOB SRCFILES src/*.cpp)
# create 1 library "core" (from the SRCFILES) and 3 projects/executables ("normals", "quad_subdivision", "obj")
add_library(core ${SRCFILES})
target_link_libraries(core PUBLIC igl::glfw)
add_executable(normals "normals.cpp")
target_link_libraries(normals PUBLIC core igl::glfw )
add_executable(quad_subdivision "quad_subdivision.cpp")
target_link_libraries(quad_subdivision PUBLIC core igl::glfw )
add_executable(obj "obj.cpp")
target_link_libraries(obj PUBLIC core igl::glfw igl::stb)