Skip to content
Snippets Groups Projects
Commit 93d81bb9 authored by Rene Halver's avatar Rene Halver
Browse files

always compile bundled voro++ version

parent 8677fc0f
Branches
Tags
No related merge requests found
...@@ -26,25 +26,10 @@ if(CM_ALL_VTK_OUTPUT) ...@@ -26,25 +26,10 @@ if(CM_ALL_VTK_OUTPUT)
endif(CM_ALL_VTK_OUTPUT) endif(CM_ALL_VTK_OUTPUT)
if(CM_ALL_VORONOI) if(CM_ALL_VORONOI)
find_package(VORO) message(STATUS "compiling voro++ version in contrib/voro++")
if(NOT VORO_FOUND)
message(STATUS "voro++ not found by cmake, trying to find voro++ in system")
find_library(CM_ALL_VORO_LIB voro++ PATH_SUFFIXES lib)
find_path(CM_ALL_VORO_INC "voro++.hh" PATH_SUFFIXES include)
if (CM_ALL_VORO_LIB AND CM_ALL_VORO_INC)
message(STATUS "voro++ found in system, using system version")
elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/voro++)
message(STATUS "voro++ not found in system, compiling version in contrib/voro++")
add_subdirectory(contrib/voro++) add_subdirectory(contrib/voro++)
set(CM_ALL_VORO_INC ../contrib/voro++/include) set(CM_ALL_VORO_INC ../contrib/voro++/include)
set(CM_ALL_VORO_LIB "-L../contrib/voro++/src -lvoro") set(CM_ALL_VORO_LIB "-L../contrib/voro++/src -lvoro")
else()
message(FATAL_ERROR "no version of voro++ found, cannot use CM_ALL_VORONOI!")
endif()
else()
set(CM_ALL_VORO_INC ${VORO_INCLUDE_DIRS})
set(CM_ALL_VORO_LIB ${VORO_LIBRARY_DIRS})
endif()
add_compile_options("-DALL_VORONOI") add_compile_options("-DALL_VORONOI")
endif() endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment