generated from libigl/libigl-example-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
25 lines (20 loc) · 1.09 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
cmake_minimum_required(VERSION 3.1)
project(example)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# libigl
option(LIBIGL_WITH_OPENGL "Use OpenGL" ON)
option(LIBIGL_WITH_OPENGL_GLFW "Use GLFW" ON)
option(LIBIGL_WITH_OPENGL_GLFW_IMGUI "Use ImGui" ON)
option(LIBIGL_WITH_CGAL "Use CGAL" ON)
find_package(LIBIGL REQUIRED QUIET)
set(IMGUIZMO_PATH ${LIBIGL_SOURCE_DIR}/igl/opengl/glfw/imgui/imguizmo)
# Add the files containing your project's core functionality
file(GLOB SRCFILES include/*.cpp)
add_library(core ${SRCFILES})
target_include_directories(core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/)
# these files may depend on libigl
target_link_libraries(core igl::core igl::opengl igl::opengl_glfw igl::opengl_glfw_imgui igl::cgal)
add_executable(main main.cpp)
set_target_properties (main PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/)
target_include_directories(main PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/)
target_link_libraries(main core igl::core igl::opengl igl::opengl_glfw igl::opengl_glfw_imgui)