34 lines
856 B
CMake
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)
|