option(PSEMEK_ROBUST_PREDICATES "Use robust geometric predicates" OFF)

find_package(Boost REQUIRED)
if(PSEMEK_ROBUST_PREDICATES)
	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 Boost::boost)
if(PSEMEK_ROBUST_PREDICATES)
	target_link_libraries(psemek-math PUBLIC gmp)
endif()

psemek_glob_tests(psemek-math tests)
