option(PSEMEK_GEOM_ROBUST_PREDICATES "Use robust geometric predicates" OFF)

if(PSEMEK_GEOM_ROBUST_PREDICATES)
	find_package(Boost REQUIRED)
	find_package(GMP REQUIRED)
endif()

file(GLOB_RECURSE PSEMEK_GEOM_HEADERS "include/*.hpp")
file(GLOB_RECURSE PSEMEK_GEOM_SOURCES "source/*.cpp")

add_library(geom ${PSEMEK_GEOM_HEADERS} ${PSEMEK_GEOM_SOURCES})
target_include_directories(geom PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_link_libraries(geom PUBLIC util)
if(PSEMEK_GEOM_ROBUST_PREDICATES)
	target_link_libraries(geom PUBLIC Boost::boost GMP)
	target_compile_definitions(geom PUBLIC -DPSEMEK_GEOM_ROBUST_PREDICATES=1)
endif()
