aboutsummaryrefslogtreecommitdiff
path: root/upstream/clipper-6.4.2/cpp/CMakeLists.txt
diff options
context:
space:
mode:
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 )