poly2tri/CMakeLists.txt
Pierre Dejoue 7125fdb13b Add CMake files for the unit tests
- Building unit tests is optional, disabled by default to prevent
  the library clients from pulling the dependency on boost
- Add the unit tests to the Github Actions.
- Use boost::filesystem to manipulate paths for better portability
2020-08-27 19:16:17 +02:00

16 lines
390 B
CMake

cmake_minimum_required(VERSION 3.12)
project(poly2tri LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 14)
option(P2T_BUILD_TESTS "Build tests" OFF)
file(GLOB SOURCES poly2tri/common/*.cc poly2tri/sweep/*.cc)
add_library(poly2tri ${SOURCES})
target_include_directories(poly2tri INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
if(P2T_BUILD_TESTS)
enable_testing()
add_subdirectory(unittest)
endif()