mirror of
https://github.com/jhasse/poly2tri.git
synced 2024-11-26 15:26:12 +01:00
Add CMake files for the testbed
This commit is contained in:
parent
7125fdb13b
commit
05546087fb
@ -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()
|
||||
|
15
testbed/CMakeLists.txt
Normal file
15
testbed/CMakeLists.txt
Normal file
@ -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
|
||||
)
|
Loading…
Reference in New Issue
Block a user