]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
[CMake] Add zlibstatic alias when BUILD_SHARED_LIBS is "OFF"
authorpast-due <30942300+past-due@users.noreply.github.com>
Sun, 14 Mar 2021 20:53:07 +0000 (16:53 -0400)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 15 Mar 2021 16:03:35 +0000 (17:03 +0100)
CMakeLists.txt

index 6f5bb42bdc68b58afe59e820e5e59fe8e8d873f4..7385f6d2fe11bc2e78a81ba17ab37754edb4643b 100644 (file)
@@ -900,6 +900,10 @@ if(NOT DEFINED BUILD_SHARED_LIBS)
 else()
     add_library(zlib ${ZLIB_ALL_SRCS})
 
+    if(NOT BUILD_SHARED_LIBS)
+        add_library(zlibstatic ALIAS zlib)
+    endif()
+
     set(ZLIB_INSTALL_LIBRARIES zlib)
 endif()