summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/2geom/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
commitcca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch)
tree146f39ded1c938019e1ed42d30923c2ac9e86789 /src/3rdparty/2geom/tests/CMakeLists.txt
parentInitial commit. (diff)
downloadinkscape-upstream.tar.xz
inkscape-upstream.zip
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/3rdparty/2geom/tests/CMakeLists.txt')
-rw-r--r--src/3rdparty/2geom/tests/CMakeLists.txt54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/3rdparty/2geom/tests/CMakeLists.txt b/src/3rdparty/2geom/tests/CMakeLists.txt
new file mode 100644
index 0000000..e96f768
--- /dev/null
+++ b/src/3rdparty/2geom/tests/CMakeLists.txt
@@ -0,0 +1,54 @@
+
+find_package(GTest REQUIRED MODULE)
+# Use this variable for tests which provide their own main().
+SET(2GEOM_TESTS_SRC
+#bezier-utils-test
+#lin_alg_test
+sbasis-text-test
+root-find-test
+implicitization-test
+#timing-test
+#rtree-performance-test
+)
+
+# Use this variable for GTest tests which should have a default main().
+SET(2GEOM_GTESTS_SRC
+affine-test
+angle-test
+bezier-test
+choose-test
+circle-test
+convex-hull-test
+coord-test
+ellipse-test
+elliptical-arc-test
+intersection-graph-test
+interval-test
+line-test
+nl-vector-test
+parallelogram-test
+path-test
+point-test
+polynomial-test
+rect-test
+sbasis-test
+)
+
+foreach(source ${2GEOM_GTESTS_SRC})
+ add_executable(${source} ${source}.cpp)
+ target_include_directories(${source} PRIVATE ${GSL_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS})
+ target_link_libraries(${source} 2geom GTest::Main ${GSL_LIBRARIES} ${GTK3_LIBRARIES})
+ add_test(NAME ${source} COMMAND ${source})
+endforeach()
+
+foreach(source ${2GEOM_TESTS_SRC})
+ add_executable(${source} ${source}.cpp)
+ target_include_directories(${source} PRIVATE ${GSL_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS})
+ target_link_libraries(${source} 2geom GTest::GTest ${GSL_LIBRARIES} ${GTK3_LIBRARIES})
+ add_test(NAME ${source} COMMAND ${source})
+endforeach(source)
+
+if(WIN32 AND 2GEOM_BUILD_SHARED)
+ add_custom_target(copy ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/src/2geom/lib2geom.dll ${CMAKE_BINARY_DIR}/src/tests/lib2geom.dll)
+ add_dependencies(copy 2geom)
+endif()