[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.
This commit is contained in:
Kristian Duske 2022-10-19 03:32:42 +02:00 committed by GitHub
parent da212216c9
commit 6ee2fa9893
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 3 deletions

View File

@ -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")

View File

@ -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",

View File

@ -5806,7 +5806,7 @@
},
"poly2tri": {
"baseline": "2020-07-21",
"port-version": 2
"port-version": 3
},
"polyclipping": {
"baseline": "6.4.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6f490bcfed9bb8b55036006a4389bfa7e94c73ff",
"version-date": "2020-07-21",
"port-version": 3
},
{
"git-tree": "03cdd793a8f279b18df99f74bf4eef1e24ad5809",
"version-string": "2020-07-21",