# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.

cmake_minimum_required(VERSION 3.1...3.22)
project(Polytech_ModGeom)

if (APPLE)
	message("-------------- APPLE system found")
    set(CMAKE_C_COMPILER "/usr/bin/gcc")
    set(CMAKE_CXX_COMPILER "/usr/bin/clang")
    INCLUDE_DIRECTORIES(/opt/homebrew/include)
else ()
	message("-------------- non APPLE system found")
    
    # ###### For Polytech VDIs
#	set(CGAL_DIR "/amuhome/bruasse.a/Public/Libs/CGAL-5.4/lib/cmake/CGAL")
#	list (APPEND CMAKE_PREFIX_PATH "/opt/Qt-5.15/5.15.0/gcc_64")
#	set (Qt5_DIR "/opt/Qt-5.15/5.15.0/gcc_64/lib/cmake/Qt5")
#	set(Boost_USE_STATIC_LIBS OFF)
#	set(Boost_USE_MULTITHREADED ON)
#	set(Boost_USE_STATIC_RUNTIME OFF)
#	set(Boost_NO_SYSTEM_PATHS TRUE)

#	if (Boost_NO_SYSTEM_PATHS)
#		set(BOOST_ROOT "/amuhome/bruasse.a/Public/Libs/boost_1_78")
#		set(BOOST_INCLUDE_DIRS "${BOOST_ROOT}/include")
#		set(BOOST_LIBRARY_DIRS "${BOOST_ROOT}/lib")
#	endif (Boost_NO_SYSTEM_PATHS)
 
    # ###### For AMU desktops:
    # Uncomment all previous section
    
endif (APPLE)

#include_directories("/usr/local/include" "/opt/local/include" "./libs")
include_directories("./libs")

#find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5)
#find_package(CGAL REQUIRED COMPONENTS ImageIO)
find_package(CGAL REQUIRED COMPONENTS Core)

#add_definitions(-DCGAL_USE_BASIC_VIEWER)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_BUILD_TYPE Release)

set(SRCS3
	hole_fill.cpp
	mesh_functions.cpp
	hole_filling.cpp
	courbures.cpp)
 

set(HEADERS
	mesh_functions.hpp
	starter_defs.h
	distrib.hpp
	courbures.h)


add_executable(hole_fill ${SRCS3} ${HEADERS} hole_filling.h)
target_link_libraries(hole_fill PUBLIC CGAL::CGAL)

