diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d9a358..765120b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ project(poly2tri LANGUAGES CXX) set(CMAKE_CXX_STANDARD 14) option(P2T_BUILD_TESTS "Build tests" OFF) +option(P2T_BUILD_TESTBED "Build the testbed application" OFF) file(GLOB SOURCES poly2tri/common/*.cc poly2tri/sweep/*.cc) add_library(poly2tri ${SOURCES}) @@ -13,3 +14,7 @@ if(P2T_BUILD_TESTS) enable_testing() add_subdirectory(unittest) endif() + +if(P2T_BUILD_TESTBED) + add_subdirectory(testbed) +endif() diff --git a/testbed/CMakeLists.txt b/testbed/CMakeLists.txt new file mode 100644 index 0000000..385f01b --- /dev/null +++ b/testbed/CMakeLists.txt @@ -0,0 +1,15 @@ +# Dependencies +find_package(glfw3 3.3 REQUIRED) +find_package(OpenGL REQUIRED) + +# Build testbed +add_executable(testbed + main.cc +) + +target_link_libraries(testbed + PRIVATE + glfw + OpenGL::GL + poly2tri +)