From 38fa9a391ee05ecd9c6a14104290e6d6aad3188c Mon Sep 17 00:00:00 2001 From: Corentin Le Molgat Date: Wed, 30 Oct 2024 15:01:59 +0100 Subject: [PATCH] cmake: Fix windows nuget package --- cmake/dotnet.cmake | 16 +- .../dotnet/Google.OrTools.runtime.csproj.in | 185 +++++++++--------- 2 files changed, 107 insertions(+), 94 deletions(-) diff --git a/cmake/dotnet.cmake b/cmake/dotnet.cmake index 3c6eca601d..fbd53bf929 100644 --- a/cmake/dotnet.cmake +++ b/cmake/dotnet.cmake @@ -362,15 +362,20 @@ file(MAKE_DIRECTORY ${DOTNET_PACKAGES_DIR}) # *.csproj.in contains: # CMake variable(s) (@PROJECT_NAME@) that configure_file() can manage and # generator expression ($) that file(GENERATE) can manage. +set(is_windows "$") set(is_not_windows "$>") -set(need_zlib_lib "$>") +set(need_unix_zlib_lib "$>") +set(need_windows_zlib_lib "$>") -set(need_absl_lib "$>") +set(need_unix_absl_lib "$>") +set(need_windows_absl_lib "$>") -set(need_re2_lib "$>") +set(need_unix_re2_lib "$>") +set(need_windows_re2_lib "$>") -set(need_protobuf_lib "$>") +set(need_unix_protobuf_lib "$>") +set(need_windows_protobuf_lib "$>") set(need_coinutils_lib "$>") set(need_osi_lib "$>") @@ -378,7 +383,8 @@ set(need_clp_lib "$>") set(need_cgl_lib "$>") set(need_cbc_lib "$>") -set(need_highs_lib "$>") +set(need_unix_highs_lib "$>") +set(need_windows_highs_lib "$>") set(is_ortools_shared "$,SHARED_LIBRARY>") diff --git a/ortools/dotnet/Google.OrTools.runtime.csproj.in b/ortools/dotnet/Google.OrTools.runtime.csproj.in index b00871d634..aa09cf62ab 100644 --- a/ortools/dotnet/Google.OrTools.runtime.csproj.in +++ b/ortools/dotnet/Google.OrTools.runtime.csproj.in @@ -27,96 +27,102 @@ runtimes/@DOTNET_RID@/native/%(Filename)%(Extension) true