[geogram] build geogram dynamic if crt linkage dynamic (#13719)

Co-authored-by: wangli28 <wangli28@beyondsoft.com>
This commit is contained in:
Eli Arzhannikov 2020-10-06 18:24:52 +02:00 committed by GitHub
parent 748a2564ef
commit 7f0ea8004d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,6 @@
Source: geogram
Version: 1.7.5
Port-Version: 1
Port-Version: 2
Homepage: https://gforge.inria.fr/projects/geogram/
Description: Geogram is a programming library of geometric algorithms.
Build-Depends: openblas, lapack

View File

@ -1,4 +1,5 @@
set(GEOGRAM_VERSION 1.7.5)
vcpkg_fail_port_install(ON_TARGET "UWP")
vcpkg_download_distfile(ARCHIVE
URLS "https://gforge.inria.fr/frs/download.php/file/38314/geogram_${GEOGRAM_VERSION}.tar.gz"
@ -27,6 +28,11 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
if (VCPKG_TARGET_IS_WINDOWS)
set(VORPALINE_PLATFORM Win-vs-generic)
endif()
if (VCPKG_CRT_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS)
message("geogram on Windows with CRT dynamic linkage only supports dynamic library linkage. Building dynamic.")
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VORPALINE_PLATFORM Win-vs-dynamic-generic)
endif()
if (VCPKG_TARGET_IS_LINUX)
message("geogram on Linux only supports dynamic library linkage. Building dynamic.")
set(VCPKG_LIBRARY_LINKAGE dynamic)