vcpkg/ports/ktx/0003-libtool.patch
Sergei Kachkov b24cd526fc
[ktx] Static build fix (#29756)
* [ktx] Fix missing zstd dependency

* [ktx] Fix GNU libtool issue for static build with enabled 'tools' feature

* [ktx] Update port version
2023-02-23 12:25:09 -08:00

23 lines
816 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc679fd1..13052501 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -826,7 +826,7 @@ set(CLI OFF) # Only build as library not the CLI astcencoder
add_subdirectory(lib/astc-encoder)
set_property(TARGET ${ASTC_LIB_TARGET} PROPERTY POSITION_INDEPENDENT_CODE ON)
-if(KTX_FEATURE_STATIC_LIBRARY AND NOT WIN32 AND NOT EMSCRIPTEN)
+if(KTX_FEATURE_STATIC_LIBRARY AND APPLE)
# Make a single static library to simplify linking.
add_dependencies(ktx ${ASTC_LIB_TARGET})
add_custom_command( TARGET ktx
@@ -856,7 +856,7 @@ if(KTX_FEATURE_DOC)
endif()
set(KTX_INSTALL_TARGETS ktx)
-if(KTX_FEATURE_STATIC_LIBRARY AND (WIN32 OR EMSCRIPTEN))
+if(KTX_FEATURE_STATIC_LIBRARY AND NOT APPLE)
list(APPEND KTX_INSTALL_TARGETS ${ASTC_LIB_TARGET})
endif()