From 16bbe71c526b480a9b2f5d37711397eeab11bc48 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Thu, 26 Dec 2024 11:41:48 +0100 Subject: [PATCH] add vcpkg json and triplet --- src/triplets/x64-linux-antares.cmake | 5 +++ src/triplets/x64-linux-release.cmake | 7 ++++ src/triplets/x64-windows-antares.cmake | 11 ++++++ src/triplets/x64-windows-release.cmake | 15 +++++++++ src/vcpkg.json | 46 ++++++++++++++++++++++++++ 5 files changed, 84 insertions(+) create mode 100644 src/triplets/x64-linux-antares.cmake create mode 100644 src/triplets/x64-linux-release.cmake create mode 100644 src/triplets/x64-windows-antares.cmake create mode 100644 src/triplets/x64-windows-release.cmake create mode 100644 src/vcpkg.json diff --git a/src/triplets/x64-linux-antares.cmake b/src/triplets/x64-linux-antares.cmake new file mode 100644 index 0000000000..63954c80c5 --- /dev/null +++ b/src/triplets/x64-linux-antares.cmake @@ -0,0 +1,5 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CMAKE_SYSTEM_NAME Linux) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + diff --git a/src/triplets/x64-linux-release.cmake b/src/triplets/x64-linux-release.cmake new file mode 100644 index 0000000000..d9eb98ddae --- /dev/null +++ b/src/triplets/x64-linux-release.cmake @@ -0,0 +1,7 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CMAKE_SYSTEM_NAME Linux) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +# Avoid building debug artifacts +set(VCPKG_BUILD_TYPE release) diff --git a/src/triplets/x64-windows-antares.cmake b/src/triplets/x64-windows-antares.cmake new file mode 100644 index 0000000000..f2480f7012 --- /dev/null +++ b/src/triplets/x64-windows-antares.cmake @@ -0,0 +1,11 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) + +# Link zlib and minizip statically +list(APPEND STATIC_PORTS "zlib.*" "minizip.*") +foreach (STATIC_PORT IN LISTS STATIC_PORTS) + if(PORT MATCHES ${STATIC_PORT}) + set(VCPKG_LIBRARY_LINKAGE static) + endif() +endforeach () diff --git a/src/triplets/x64-windows-release.cmake b/src/triplets/x64-windows-release.cmake new file mode 100644 index 0000000000..7e4eb27f4d --- /dev/null +++ b/src/triplets/x64-windows-release.cmake @@ -0,0 +1,15 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) + +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) + +# Avoid building debug artifacts +set(VCPKG_BUILD_TYPE release) + +# Link zlib and minizip statically +list(APPEND STATIC_PORTS "zlib.*" "minizip.*") +foreach (STATIC_PORT IN LISTS STATIC_PORTS) + if(PORT MATCHES ${STATIC_PORT}) + set(VCPKG_LIBRARY_LINKAGE static) + endif() +endforeach () diff --git a/src/vcpkg.json b/src/vcpkg.json new file mode 100644 index 0000000000..04a13c7bf7 --- /dev/null +++ b/src/vcpkg.json @@ -0,0 +1,46 @@ +{ + "name": "antares-simulator", + "version-string": "8.8.11", + "builtin-baseline": "9484a57dd560b89f0a583be08af6753611c57fd5", + "vcpkg-configuration": { + "overlay-ports": [ + "./ports" + ], + "overlay-triplets": [ + "./triplets" + ] + }, + "dependencies": [ + { + "name": "sirius-solver", + "version>=": "1.5" + }, + { + "name": "wxwidgets", + "platform": "windows" + }, + { + "name": "boost-test", + "version>=": "1.81.0" + }, + { + "name": "boost-core", + "version>=": "1.81.0" + }, + { + "name": "minizip-ng", + "default-features": false, + "version>=": "4.0.0", + "features": [ + "zlib" + ] + }, + { + "name": "yaml-cpp" + }, + { + "name": "antlr4" + } + ] +} +