From cca66b9ec4e494c1d919bff0f71a820d8afab1fa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:24:48 +0200 Subject: Adding upstream version 1.2.2. Signed-off-by: Daniel Baumann --- .../2geom/tests/dependent-project/CMakeLists.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/3rdparty/2geom/tests/dependent-project/CMakeLists.txt (limited to 'src/3rdparty/2geom/tests/dependent-project/CMakeLists.txt') diff --git a/src/3rdparty/2geom/tests/dependent-project/CMakeLists.txt b/src/3rdparty/2geom/tests/dependent-project/CMakeLists.txt new file mode 100644 index 0000000..c371114 --- /dev/null +++ b/src/3rdparty/2geom/tests/dependent-project/CMakeLists.txt @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 3.1) +project(test_dep_2geom CXX C) +set(CMAKE_CXX_STANDARD 17) + +option(2GEOM_AS_SUBPROJECT "include 2geom as subproject" OFF) + +if (2GEOM_AS_SUBPROJECT) + message("Using 2geom as subdirectory") + set(2GEOM_BUILD_SHARED ON CACHE BOOL "Build 2geom shared version") + add_subdirectory("../../" 2geom) +else() + message("Using installed 2geom") + find_package(2Geom REQUIRED) +endif() + +add_library(my_lib SHARED my_lib.cpp) +add_executable(main main.cpp) +target_link_libraries(main my_lib) +target_link_libraries(my_lib PUBLIC 2Geom::2geom) + +install(TARGETS + main + my_lib + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + ) -- cgit v1.2.3