option(PSEMEK_ROBUST_PREDICATES "Use robust geometric predicates" OFF)

if(PSEMEK_ROBUST_PREDICATES)
	find_package(Boost REQUIRED CONFIG)
	find_package(GMP REQUIRED)
endif()

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

psemek_add_library(psemek-math ${PSEMEK_GEOM_HEADERS} ${PSEMEK_GEOM_SOURCES})
target_include_directories(psemek-math PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_link_libraries(psemek-math PUBLIC psemek-util psemek-group)
if(PSEMEK_ROBUST_PREDICATES)
	target_link_libraries(psemek-math PUBLIC Boost::boost)
	target_link_libraries(psemek-math PUBLIC gmp)
endif()

psemek_glob_tests(psemek-math tests)
