diff --git a/ports/aeron/patches/fix-static-crt-linkage.patch b/ports/aeron/patches/fix-static-crt-linkage.patch new file mode 100644 index 0000000000..19ed8dfeab --- /dev/null +++ b/ports/aeron/patches/fix-static-crt-linkage.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1234567..abcdefg 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -178,10 +178,6 @@ elseif (MSVC) + endif () + + add_compile_options(/Oy-) +- add_compile_options($<$,$>:/MD>) +- add_compile_options($<$,$>:/MDd>) + add_compile_options($<$:/MP>) + add_compile_options($<$:/wd4251>) +- add_compile_options($<$,$>:/MD>) +- add_compile_options($<$,$>:/MDd>) + add_compile_options($<$,$>:/Od>) + add_compile_options($<$,$>:/Zi>) diff --git a/ports/aeron/portfile.cmake b/ports/aeron/portfile.cmake index a80b31128c..4134b14bfe 100644 --- a/ports/aeron/portfile.cmake +++ b/ports/aeron/portfile.cmake @@ -6,10 +6,11 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aeron-io/aeron REF "${VERSION}" - SHA512 6302b235285d897bb58d388c1883145c486f931575174b68161e67a04ae2efb48993d8045855d6e04ba378fdb58050c5339561c85fffb6b222abaa1952103d37 + SHA512 936b3a0d6903cc54246c41b946c8964b5f2957b115364445302764a579bbcc6d3c569c924aa44f96db309c0a90cef06779b608c6fc35c8284a041ff4d266f9db HEAD_REF master PATCHES patches/add-libuuid-vcpkg-support.patch + patches/fix-static-crt-linkage.patch ) # Set archive option based on feature @@ -19,13 +20,26 @@ else() set(BUILD_ARCHIVE OFF) endif() +# Set CRT linkage for Windows static builds +set(AERON_CMAKE_OPTIONS + -DAERON_INSTALL_TARGETS=ON + -DAERON_TESTS=OFF + -DAERON_BUILD_SAMPLES=OFF + -DBUILD_AERON_ARCHIVE_API=${BUILD_ARCHIVE} +) + +# Only set static CRT if triplet explicitly requests it (VCPKG_CRT_LINKAGE=static) +# Otherwise, respect the triplet's CRT setting (dynamic/MD or static/MT) +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_CRT_LINKAGE STREQUAL "static") + list(APPEND AERON_CMAKE_OPTIONS + -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$$<$$:Debug> + -DCMAKE_POLICY_DEFAULT_CMP0091=NEW + ) +endif() + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" - OPTIONS - -DAERON_INSTALL_TARGETS=ON - -DAERON_TESTS=OFF - -DAERON_BUILD_SAMPLES=OFF - -DBUILD_AERON_ARCHIVE_API=${BUILD_ARCHIVE} + OPTIONS ${AERON_CMAKE_OPTIONS} ) vcpkg_cmake_install() diff --git a/ports/aeron/vcpkg.json b/ports/aeron/vcpkg.json index c887772a40..223af38589 100644 --- a/ports/aeron/vcpkg.json +++ b/ports/aeron/vcpkg.json @@ -1,8 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "aeron", - "version": "1.49.3", - "port-version": 2, + "version": "1.50.0", "description": "Efficient reliable UDP unicast, UDP multicast, and IPC message transport", "homepage": "https://github.com/aeron-io/aeron", "license": "Apache-2.0", diff --git a/versions/a-/aeron.json b/versions/a-/aeron.json index d85e260a57..3101f1a17f 100644 --- a/versions/a-/aeron.json +++ b/versions/a-/aeron.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "936aefc7566d95f7234b2d57c8878a1253220ee7", + "version": "1.50.0", + "port-version": 0 + }, { "git-tree": "99b549362720ba9d2df482b3e21b9009a4f5f94b", "version": "1.49.3", diff --git a/versions/baseline.json b/versions/baseline.json index 0924456d38..c8c4632b2d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -57,8 +57,8 @@ "port-version": 0 }, "aeron": { - "baseline": "1.49.3", - "port-version": 2 + "baseline": "1.50.0", + "port-version": 0 }, "air-ctl": { "baseline": "1.1.2",