aboutsummaryrefslogtreecommitdiff
path: root/upstream/clipper-6.4.2/cpp/CMakeLists.txt
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-01-24 18:44:56 +0100
committerjaseg <git@jaseg.de>2021-01-24 18:44:56 +0100
commitf7b4cc602b9a646fbc66f3f17d6bb9c20efc3ead (patch)
treed7b110b65e93b87fc65472559ac74e7eb961bc7c /upstream/clipper-6.4.2/cpp/CMakeLists.txt
downloadgerbolyze-f7b4cc602b9a646fbc66f3f17d6bb9c20efc3ead.tar.gz
gerbolyze-f7b4cc602b9a646fbc66f3f17d6bb9c20efc3ead.tar.bz2
gerbolyze-f7b4cc602b9a646fbc66f3f17d6bb9c20efc3ead.zip
Initial commit
Diffstat (limited to 'upstream/clipper-6.4.2/cpp/CMakeLists.txt')
-rw-r--r--upstream/clipper-6.4.2/cpp/CMakeLists.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/upstream/clipper-6.4.2/cpp/CMakeLists.txt b/upstream/clipper-6.4.2/cpp/CMakeLists.txt
new file mode 100644
index 0000000..32293cb
--- /dev/null
+++ b/upstream/clipper-6.4.2/cpp/CMakeLists.txt
@@ -0,0 +1,21 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0)
+PROJECT(polyclipping)
+
+SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Release type")
+# The header name clipper.hpp is too generic, so install in a subdirectory
+SET(CMAKE_INSTALL_INCDIR "${CMAKE_INSTALL_PREFIX}/include/polyclipping")
+SET(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
+SET(CMAKE_INSTALL_PKGCONFIGDIR "${CMAKE_INSTALL_PREFIX}/share/pkgconfig")
+SET(PCFILE "${CMAKE_CURRENT_BINARY_DIR}/polyclipping.pc")
+
+SET(BUILD_SHARED_LIBS ON CACHE BOOL
+ "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)")
+ADD_LIBRARY(polyclipping clipper.cpp)
+
+CONFIGURE_FILE (polyclipping.pc.cmakein "${PCFILE}" @ONLY)
+
+INSTALL (FILES clipper.hpp DESTINATION "${CMAKE_INSTALL_INCDIR}")
+INSTALL (TARGETS polyclipping LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+INSTALL (FILES "${PCFILE}" DESTINATION "${CMAKE_INSTALL_PKGCONFIGDIR}")
+
+SET_TARGET_PROPERTIES(polyclipping PROPERTIES VERSION 22.0.0 SOVERSION 22 )