compiles on openSUSE 15.4 part 2
[engrid-github.git] / src / tetgen / CMakeLists.txt
blobf41f6739517f842a4988f6e75496e4d4d70df04b
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)
8 # CGAL
9 find_path(CGAL_INCLUDE_PATH CGAL/Exact_predicates_inexact_constructions_kernel.h /usr/include /usr/local/include)
10 if(CGAL_INCLUDE_PATH)
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})
14   #FIND_PACKAGE(Boost)
15   #if (BOOST_FOUND)
16   #  include_directories(${BOOST_INCLUDE_PATH})
17   #endif (BOOST_FOUND)
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})
22 endif()
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
30 #library
31 set_target_properties(tet PROPERTIES "COMPILE_DEFINITIONS" TETLIBRARY)
33 install(TARGETS tetgen DESTINATION bin)