Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ The .NET Foundation licenses this file to you under the MIT license.

<ItemGroup>
<!-- zlib must be added after System.IO.Compression.Native, order matters. -->
<NativeLibrary Condition="'$(UseSystemZlib)' != 'true'" Include="$(IlcSdkPath)libz.a" />
<NativeLibrary Condition="'$(UseSystemZlib)' != 'true'" Include="$(IlcFrameworkNativePath)libz.a" />
</ItemGroup>

<ItemGroup Condition="'$(StaticICULinking)' == 'true' and '$(NativeLib)' != 'Static' and '$(InvariantGlobalization)' != 'true'">
Expand Down
9 changes: 5 additions & 4 deletions src/native/libs/System.IO.Compression.Native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI)
endif()

set_target_properties(System.IO.Compression.Native-Static PROPERTIES OUTPUT_NAME System.IO.Compression.Native CLEAN_DIRECT_OUTPUT 1)

install (TARGETS zlib DESTINATION ${STATIC_LIB_DESTINATION} COMPONENT libs)
else ()
if (GEN_SHARED_LIB)
include (GenerateExportHeader)
Expand Down Expand Up @@ -163,12 +165,11 @@ else ()
if(STATIC_LIBS_ONLY)
install_static_library(System.IO.Compression.Native.Aot aotsdk nativeaot)
install_static_library(System.IO.Compression.Native.Aot.GuardCF aotsdk nativeaot)
if (NOT CLR_CMAKE_USE_SYSTEM_ZLIB)
install_static_library(zlib aotsdk nativeaot)
endif()
endif()

endif ()

if((NOT CLR_CMAKE_USE_SYSTEM_ZLIB) AND STATIC_LIBS_ONLY)
install_static_library(zlib aotsdk nativeaot)
endif()

install (TARGETS System.IO.Compression.Native-Static DESTINATION ${STATIC_LIB_DESTINATION} COMPONENT libs)
Loading