]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
[cmake] add uuid library when using xmllite 2640/head
authorSteve Lhomme <robux4@ycbcr.xyz>
Mon, 26 May 2025 08:44:49 +0000 (10:44 +0200)
committerSteve Lhomme <robux4@ycbcr.xyz>
Mon, 26 May 2025 08:44:49 +0000 (10:44 +0200)
Consecutive to 16fd043f51d911b106f2a7834ad8f08f65051977
IID_ISequentialStream is required by the code.
This GUID is defined in uuid.lib or libuuid.a in mingw-w64. It is required
to link with that library to get the definition of the GUID. Some toolchains
add it by default but not all.

CMakeLists.txt

index 7096b7c00a00740d9a1492814d9858d931f7f051..e938df72b16c330566fef3398867f0623c414f75 100644 (file)
@@ -1257,7 +1257,7 @@ ELSE(LIBXML2_FOUND)
       # Check linkage as well; versions of mingw-w64 before v11.0.0
       # do not contain an import library for xmllite.
       cmake_push_check_state()
-      SET(CMAKE_REQUIRED_LIBRARIES "xmllite")
+      SET(CMAKE_REQUIRED_LIBRARIES "xmllite" "uuid")
       check_c_source_compiles("
       #include <initguid.h>
       #include <xmllite.h>
@@ -1268,7 +1268,7 @@ ELSE(LIBXML2_FOUND)
       cmake_pop_check_state()
       IF(HAVE_XMLLITE_H)
         SET(XMLLITE_FOUND TRUE)
-        LIST(APPEND ADDITIONAL_LIBS "xmllite")
+        LIST(APPEND ADDITIONAL_LIBS "xmllite" "uuid")
       ENDIF()
     ENDIF()
   ENDIF(EXPAT_FOUND)