1 cmake_minimum_required(VERSION 3.0.2)
3 add_definitions(-DNDEBUG)
5 # Add an executable to the project using the specified source files.
6 add_executable(tetgen tetgen.cxx predicates.cxx)
9 find_path(CGAL_INCLUDE_PATH CGAL/Exact_predicates_inexact_constructions_kernel.h /usr/include /usr/local/include)
11 add_definitions(-DUSE_CGAL_PREDICATES)
12 find_path (BOOST_INCLUDE_PATH any.hpp /usr/include/boost /usr/local/include/boost /opt/local/include/boost /macports/include)
13 include_directories(${BOOST_INCLUDE_PATH})
16 # include_directories(${BOOST_INCLUDE_PATH})
18 find_library(GMP_LIBRARY
19 NAMES libgmp.so libgmp.dylib
20 PATHS /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 /opt/local/lib)
21 target_link_libraries(tetgen ${GMP_LIBRARY})
24 #Add a library to the project using the specified source files.
25 # In Linux/Unix, it will creates the libtet.a
26 add_library(tet STATIC tetgen.cxx predicates.cxx)
28 #Set properties on a target.
29 #We use this here to set -DTETLIBRARY for when compiling the
31 set_target_properties(tet PROPERTIES "COMPILE_DEFINITIONS" TETLIBRARY)
33 install(TARGETS tetgen DESTINATION bin)