From 6ee2fa989336b512311b892f67d5dc6593267a24 Mon Sep 17 00:00:00 2001 From: Kristian Duske Date: Wed, 19 Oct 2022 03:32:42 +0200 Subject: [PATCH] [poly2tri] Set policy CMP0063 to NEW (#27263) * Set policy CMP0063 to NEW This change enables CMake to set the symbol visibility of static libraries. Since poly2tri is compiled as a static library, without this change, it can lead to linker warnings about conflicting visibility settings if it is itself linked into a dynamic library. * fixup! Set policy CMP0063 to NEW * amend! Set policy CMP0063 to NEW Set default symbol visibility to hidden Policy CMP0063 enables CMake to set the symbol visibility of static libraries. Since poly2tri is compiled as a static library, without this change, the default symbol visibility cannot be set, leading to linker warnings about conflicting visibility settings if poly2tri is itself linked into a dynamic library. --- ports/poly2tri/CMakeLists.txt | 7 +++++++ ports/poly2tri/vcpkg.json | 4 ++-- versions/baseline.json | 2 +- versions/p-/poly2tri.json | 5 +++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ports/poly2tri/CMakeLists.txt b/ports/poly2tri/CMakeLists.txt index d3878712afaaf9..0bb81850a094a8 100644 --- a/ports/poly2tri/CMakeLists.txt +++ b/ports/poly2tri/CMakeLists.txt @@ -1,5 +1,12 @@ cmake_minimum_required(VERSION 3.0) +if(POLICY CMP0063) + cmake_policy(SET CMP0063 NEW) +endif() + +set(CMAKE_CXX_VISIBILITY_PRESET hidden) +set(CMAKE_VISIBILITY_INLINES_HIDDEN TRUE) + project(poly2tri LANGUAGES C CXX) set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") diff --git a/ports/poly2tri/vcpkg.json b/ports/poly2tri/vcpkg.json index c8b963097d965a..a00b5badd57aa6 100644 --- a/ports/poly2tri/vcpkg.json +++ b/ports/poly2tri/vcpkg.json @@ -1,7 +1,7 @@ { "name": "poly2tri", - "version-string": "2020-07-21", - "port-version": 2, + "version-date": "2020-07-21", + "port-version": 3, "description": "The Clipper library performs clipping and offsetting for both lines and polygons. All four boolean clipping operations are supported - intersection, union, difference and exclusive-or. Polygons can be of any shape including self-intersecting polygons.", "homepage": "https://github.com/greenm01/poly2tri", "supports": "!uwp", diff --git a/versions/baseline.json b/versions/baseline.json index 102a0a0d42ce0c..5168bcdc27ccf3 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5806,7 +5806,7 @@ }, "poly2tri": { "baseline": "2020-07-21", - "port-version": 2 + "port-version": 3 }, "polyclipping": { "baseline": "6.4.2", diff --git a/versions/p-/poly2tri.json b/versions/p-/poly2tri.json index 070277383066af..7c41e7f05af3b7 100644 --- a/versions/p-/poly2tri.json +++ b/versions/p-/poly2tri.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "6f490bcfed9bb8b55036006a4389bfa7e94c73ff", + "version-date": "2020-07-21", + "port-version": 3 + }, { "git-tree": "03cdd793a8f279b18df99f74bf4eef1e24ad5809", "version-string": "2020-07-21",