lordgamez commented on code in PR #2036:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2036#discussion_r2376296254


##########
cmake/LibXml2.cmake:
##########
@@ -0,0 +1,50 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
+set(LIBXML2_WITH_DEBUG OFF CACHE BOOL "" FORCE)
+set(LIBXML2_WITH_PROGRAMS OFF CACHE BOOL "" FORCE)
+set(LIBXML2_WITH_TESTS OFF CACHE BOOL "" FORCE)
+set(LIBXML2_WITH_CATALOG OFF CACHE BOOL "" FORCE)
+set(LIBXML2_WITH_ICONV OFF CACHE BOOL "" FORCE)
+set(LIBXML2_WITH_ICU OFF CACHE BOOL "" FORCE)
+
+include(FetchContent)
+FetchContent_Declare(
+    libxml2
+    URL https://github.com/GNOME/libxml2/archive/refs/tags/v2.15.0.tar.gz
+    URL_HASH 
SHA256=e24bd5209afefe390e704ebc55649c7ae240e1f157cefd433ccc86c610d20aac
+    SYSTEM
+)
+FetchContent_MakeAvailable(libxml2)
+
+set(LIBXML2_FOUND "YES" CACHE STRING "" FORCE)
+set(LIBXML2_INCLUDE_DIRS
+    "${libxml2_SOURCE_DIR}/include"
+    "${libxml2_BINARY_DIR}"
+    CACHE STRING "" FORCE)
+if (WIN32)
+    set(LIBXML2_LIBRARIES "${libxml2_BINARY_DIR}/libxml2s.lib" CACHE STRING "" 
FORCE)
+    set(LIBXML2_LIBRARY "${libxml2_BINARY_DIR}/libxml2s.lib" CACHE STRING "" 
FORCE)
+else()
+    set(LIBXML2_LIBRARIES "${libxml2_BINARY_DIR}/libxml2.a" CACHE STRING "" 
FORCE)
+    set(LIBXML2_LIBRARY "${libxml2_BINARY_DIR}/libxml2.a" CACHE STRING "" 
FORCE)
+endif()

Review Comment:
   Good point, I checked and there's a slight difference in the path using 
msbuild, updated in 
https://github.com/apache/nifi-minifi-cpp/pull/2036/commits/735bc93601f895b68a0c377adb20033e21784c07



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to