git: 7763ad8dc10a - main - devel/libddwaf: Update to 1.13.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 21 Aug 2023 19:05:18 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7763ad8dc10aad06b262cbe4d3c0c63dcae42135

commit 7763ad8dc10aad06b262cbe4d3c0c63dcae42135
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-08-21 18:52:01 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-08-21 18:52:01 +0000

    devel/libddwaf: Update to 1.13.0
    
    Changes:        https://github.com/DataDog/libddwaf/releases
---
 devel/libddwaf/Makefile                            |   4 +-
 devel/libddwaf/distinfo                            |  10 +-
 devel/libddwaf/files/patch-CMakeLists.txt          |  48 +++++----
 .../files/patch-third_party-CMakeLists.txt         | 109 +++++++++++----------
 4 files changed, 95 insertions(+), 76 deletions(-)

diff --git a/devel/libddwaf/Makefile b/devel/libddwaf/Makefile
index 447d0330c3f6..8e3a717470aa 100644
--- a/devel/libddwaf/Makefile
+++ b/devel/libddwaf/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	libddwaf
-PORTVERSION=	1.12.0
+PORTVERSION=	1.13.0
 CATEGORIES=	devel
 
 MAINTAINER=	sunpoet@FreeBSD.org
@@ -28,7 +28,7 @@ CMAKE_ON=	LIBDDWAF_BUILD_SHARED LIBDDWAF_BUILD_STATIC
 USE_GITHUB=	yes
 GH_ACCOUNT=	DataDog
 GH_TUPLE=	DataDog:appsec-event-rules:1.7.1:DataDog_appsec_event_rules/third_party/proj_event_rules \
-		Tencent:rapidjson:a95e013:Tencent_rapidjson/third_party/rapidjson
+		Tencent:rapidjson:476ffa2:Tencent_rapidjson/third_party/rapidjson
 
 post-patch:
 # Clean up bundled libraries
diff --git a/devel/libddwaf/distinfo b/devel/libddwaf/distinfo
index 2251211e6500..8ff8da89b863 100644
--- a/devel/libddwaf/distinfo
+++ b/devel/libddwaf/distinfo
@@ -1,7 +1,7 @@
-TIMESTAMP = 1691069924
-SHA256 (DataDog-libddwaf-1.12.0_GH0.tar.gz) = 68000b76f44118fe726750df3a54effc987def5b368be002c495383df9437ac4
-SIZE (DataDog-libddwaf-1.12.0_GH0.tar.gz) = 745164
+TIMESTAMP = 1692640036
+SHA256 (DataDog-libddwaf-1.13.0_GH0.tar.gz) = f473559fb5a78c3bbd760dc963c2b2c089e614c3e3b6723934ab5ce2d4c59cee
+SIZE (DataDog-libddwaf-1.13.0_GH0.tar.gz) = 767017
 SHA256 (DataDog-appsec-event-rules-1.7.1_GH0.tar.gz) = df0e72ec448f66f7752c0f6c411b8172751524eaae66b9219a477668e1e65f91
 SIZE (DataDog-appsec-event-rules-1.7.1_GH0.tar.gz) = 134403
-SHA256 (Tencent-rapidjson-a95e013_GH0.tar.gz) = 44d777549051b4dabea4dd2290d6b63a340c103e819da0c85f658606f4e88b6a
-SIZE (Tencent-rapidjson-a95e013_GH0.tar.gz) = 1115459
+SHA256 (Tencent-rapidjson-476ffa2_GH0.tar.gz) = 6a1628b73d007ffe5d2bc84f206d05b2194e25eeb0585a41bfd29db150591f84
+SIZE (Tencent-rapidjson-476ffa2_GH0.tar.gz) = 1115582
diff --git a/devel/libddwaf/files/patch-CMakeLists.txt b/devel/libddwaf/files/patch-CMakeLists.txt
index 7409c74399cc..5d7df8ac29b0 100644
--- a/devel/libddwaf/files/patch-CMakeLists.txt
+++ b/devel/libddwaf/files/patch-CMakeLists.txt
@@ -1,13 +1,15 @@
---- CMakeLists.txt.orig	2023-07-28 08:52:50 UTC
+--- CMakeLists.txt.orig	2023-08-17 10:28:49 UTC
 +++ CMakeLists.txt
-@@ -8,23 +8,23 @@ set(CMAKE_PROJECT_VERSION ${version})
+@@ -7,24 +7,24 @@ set(CMAKE_PROJECT_VERSION ${version})
+ 
  configure_file(src/version.hpp.in ${CMAKE_CURRENT_SOURCE_DIR}/src/version.hpp)
  
- set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment version")
+-set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment version")
 -if(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64" OR
 -  CMAKE_OSX_ARCHITECTURES MATCHES "arm64")
 -  set(CPU_TYPE ${CMAKE_OSX_ARCHITECTURES})
 -endif()
++#set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment version")
 +#if(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64" OR
 +#  CMAKE_OSX_ARCHITECTURES MATCHES "arm64")
 +#  set(CPU_TYPE ${CMAKE_OSX_ARCHITECTURES})
@@ -34,16 +36,16 @@
  
  option(LIBDDWAF_BUILD_SHARED "Build shared library" ON)
  option(LIBDDWAF_BUILD_STATIC "Build shared library" ON)
-@@ -57,7 +57,7 @@ endif()
+@@ -58,7 +58,7 @@ endif()
  
  include(GNUInstallDirs)
  
 -add_subdirectory(third_party)
 +#add_subdirectory(third_party)
  
- set(LIBDDWAF_SOURCE
-     ${libddwaf_SOURCE_DIR}/src/ruleset_builder.cpp
-@@ -137,7 +137,8 @@ install(FILES ${libddwaf_SOURCE_DIR}/include/ddwaf.h D
+ add_library(glibc_compat OBJECT ${libddwaf_SOURCE_DIR}/src/glibc-compat/time64.c)
+ set_target_properties(glibc_compat PROPERTIES POSITION_INDEPENDENT_CODE 1)
+@@ -143,7 +143,8 @@ install(FILES ${libddwaf_SOURCE_DIR}/include/ddwaf.h D
  
  # System dependencies
  set(LIBDDWAF_INTERFACE_LIBRARIES "")
@@ -51,9 +53,9 @@
 +#set(LIBDDWAF_PRIVATE_LIBRARIES lib_re2 lib_ac lib_injection lib_radix lib_utf8proc)
 +set(LIBDDWAF_PRIVATE_LIBRARIES lib_radix)
  
- if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
- # needed for glibc <2.17. We compile with --as-needed so the library won't
-@@ -165,6 +166,27 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+ if(NOT MSVC AND LIBDDWAF_TEST_COVERAGE)
+     target_compile_options(libddwaf_objects PRIVATE -ggdb --coverage)
+@@ -176,6 +177,27 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
  elseif(WIN32)
      list(APPEND LIBDDWAF_INTERFACE_LIBRARIES ws2_32)
  endif()
@@ -81,7 +83,7 @@
  
  target_link_libraries(libddwaf_objects
      PRIVATE ${LIBDDWAF_PRIVATE_LIBRARIES}
-@@ -189,66 +211,67 @@ if (LIBDDWAF_BUILD_STATIC)
+@@ -200,71 +222,72 @@ if (LIBDDWAF_BUILD_STATIC)
          INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
  
      # Post-processing on the static library
@@ -118,6 +120,7 @@
 -              COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_injection>
 -              COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_utf8proc>
 -              COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_radix>
+-              COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_OBJECTS:glibc_compat> ar_comb
 -              COMMAND ${CMAKE_AR} -qcs ar_comb/combined${CMAKE_STATIC_LIBRARY_SUFFIX} ar_comb/*.o*
 -
 -              COMMAND ${CMAKE_COMMAND} -E copy ar_comb/combined${CMAKE_STATIC_LIBRARY_SUFFIX} $<TARGET_FILE:libddwaf_static>
@@ -126,9 +129,13 @@
 -      endif()
 -      if(NOT (CMAKE_BUILD_TYPE MATCHES Debug))
 -          if (CMAKE_SYSTEM_NAME STREQUAL Darwin OR CMAKE_SYSTEM_NAME STREQUAL Linux)
--              find_program(STRIP strip)
--              if (STRIP STREQUAL "STRIP-NOTFOUND")
--                  message(FATAL_ERROR "strip not found")
+-              if (NOT CMAKE_STRIP)
+-                  find_program(STRIP strip)
+-                  if (STRIP STREQUAL "STRIP-NOTFOUND")
+-                      message(FATAL_ERROR "strip not found")
+-                  endif()
+-              else()
+-                  set(STRIP ${CMAKE_STRIP})
 -              endif()
 -              add_custom_command(TARGET libddwaf_static POST_BUILD
 -                  COMMAND ${STRIP} -x -S $<TARGET_FILE:libddwaf_static> -o $<TARGET_FILE:libddwaf_static>.stripped)
@@ -169,6 +176,7 @@
 +#              COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_injection>
 +#              COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_utf8proc>
 +#              COMMAND ${CMAKE_COMMAND} -E chdir ar_comb ${CMAKE_AR} -x $<TARGET_FILE:lib_radix>
++#              COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_OBJECTS:glibc_compat> ar_comb
 +#              COMMAND ${CMAKE_AR} -qcs ar_comb/combined${CMAKE_STATIC_LIBRARY_SUFFIX} ar_comb/*.o*
 +#
 +#              COMMAND ${CMAKE_COMMAND} -E copy ar_comb/combined${CMAKE_STATIC_LIBRARY_SUFFIX} $<TARGET_FILE:libddwaf_static>
@@ -177,9 +185,13 @@
 +#      endif()
 +#      if(NOT (CMAKE_BUILD_TYPE MATCHES Debug))
 +#          if (CMAKE_SYSTEM_NAME STREQUAL Darwin OR CMAKE_SYSTEM_NAME STREQUAL Linux)
-+#              find_program(STRIP strip)
-+#              if (STRIP STREQUAL "STRIP-NOTFOUND")
-+#                  message(FATAL_ERROR "strip not found")
++#              if (NOT CMAKE_STRIP)
++#                  find_program(STRIP strip)
++#                  if (STRIP STREQUAL "STRIP-NOTFOUND")
++#                      message(FATAL_ERROR "strip not found")
++#                  endif()
++#              else()
++#                  set(STRIP ${CMAKE_STRIP})
 +#              endif()
 +#              add_custom_command(TARGET libddwaf_static POST_BUILD
 +#                  COMMAND ${STRIP} -x -S $<TARGET_FILE:libddwaf_static> -o $<TARGET_FILE:libddwaf_static>.stripped)
@@ -201,7 +213,7 @@
 +#        OUTPUT_VARIABLE BUILD_ID
 +#        OUTPUT_STRIP_TRAILING_WHITESPACE
 +#    )
-+    set(BUILD_ID "4be56b648aa8ce8b86255b0edad78862d102f65d")
++    set(BUILD_ID "25b0021f1d2ce1eea39a37ad41b6de9eec12ee84")
      message(STATUS "Build id is ${BUILD_ID}")
      string(SUBSTRING "${BUILD_ID}" 0 2 BUILD_ID_PREFIX)
      string(SUBSTRING "${BUILD_ID}" 2 39 BUILD_ID_SUFFIX)
diff --git a/devel/libddwaf/files/patch-third_party-CMakeLists.txt b/devel/libddwaf/files/patch-third_party-CMakeLists.txt
index bebea8992a61..41564fb5cdf0 100644
--- a/devel/libddwaf/files/patch-third_party-CMakeLists.txt
+++ b/devel/libddwaf/files/patch-third_party-CMakeLists.txt
@@ -1,4 +1,4 @@
---- third_party/CMakeLists.txt.orig	2023-05-25 10:34:56 UTC
+--- third_party/CMakeLists.txt.orig	2023-08-17 10:28:49 UTC
 +++ third_party/CMakeLists.txt
 @@ -15,24 +15,24 @@ if(NOT MSVC)
      set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wno-unused-parameter")
@@ -42,7 +42,7 @@
  target_compile_definitions(lib_rapidjson INTERFACE RAPIDJSON_HAS_STDSTRING=1)
  set_target_properties(proj_rapidjson PROPERTIES EXCLUDE_FROM_ALL TRUE)
  
-@@ -45,153 +45,153 @@ endif()
+@@ -45,32 +45,32 @@ endif()
  # To avoid building everything for re2, including test binvaries:
  #     BUILD_COMMAND cmake --build <BINARY_DIR> --target re2
  # But this is not enough, because the install target run afterwards insists on building everything
@@ -61,6 +61,7 @@
 -    -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
 -    -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
 -    -DRE2_BUILD_TESTING=0
+-    BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}re2${CMAKE_STATIC_LIBRARY_SUFFIX}
 -)
 +#set(RE2_COMMIT 885eb38accf49e2ccdd2fa6786f3590cf40a3e23)
 +#ExternalProject_Add(proj_re2
@@ -77,6 +78,7 @@
 +#    -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
 +#    -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
 +#    -DRE2_BUILD_TESTING=0
++#    BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}re2${CMAKE_STATIC_LIBRARY_SUFFIX}
 +#)
  # alas, we can't use find_package because by the package is not downloaded by config time
  # so manually creating the library
@@ -95,6 +97,12 @@
 +#endif()
 +#add_dependencies(lib_re2 proj_re2)
  
+ if(CMAKE_BUILD_TYPE MATCHES Debug)
+     set(LIBGTEST_FILENAME ${CMAKE_STATIC_LIBRARY_PREFIX}gtestd${CMAKE_STATIC_LIBRARY_SUFFIX})
+@@ -81,54 +81,54 @@ else()
+ endif()
+ 
+ 
 -set(GOOGLETEST_COMMIT 955c7f837efad184ec63e771c42542d37545eaef)
 -ExternalProject_Add(proj_gtest
 -    URL         https://github.com/google/googletest/archive/${GOOGLETEST_COMMIT}.tar.gz
@@ -110,12 +118,9 @@
 -                -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
 -                -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
 -                -DBUILD_SHARED_LIBS=0
+-                -DBUILD_GMOCK=ON
+-                BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/${LIBGTEST_FILENAME} ${INSTALL_DIR}/lib/${LIBGMOCK_FILENAME}
 -)
--if(CMAKE_BUILD_TYPE MATCHES Debug)
--    set(LIBGTEST_FILENAME ${CMAKE_STATIC_LIBRARY_PREFIX}gtestd${CMAKE_STATIC_LIBRARY_SUFFIX})
--else()
--    set(LIBGTEST_FILENAME ${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX})
--endif()
 +#set(GOOGLETEST_COMMIT 955c7f837efad184ec63e771c42542d37545eaef)
 +#ExternalProject_Add(proj_gtest
 +#    URL         https://github.com/google/googletest/archive/${GOOGLETEST_COMMIT}.tar.gz
@@ -131,29 +136,34 @@
 +#                -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
 +#                -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
 +#                -DBUILD_SHARED_LIBS=0
++#                -DBUILD_GMOCK=ON
++#                BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/${LIBGTEST_FILENAME} ${INSTALL_DIR}/lib/${LIBGMOCK_FILENAME}
 +#)
-+#if(CMAKE_BUILD_TYPE MATCHES Debug)
-+#    set(LIBGTEST_FILENAME ${CMAKE_STATIC_LIBRARY_PREFIX}gtestd${CMAKE_STATIC_LIBRARY_SUFFIX})
-+#else()
-+#    set(LIBGTEST_FILENAME ${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX})
-+#endif()
  
 -add_library(lib_gtest STATIC IMPORTED GLOBAL)
+-add_library(lib_gmock STATIC IMPORTED GLOBAL)
 -set_property(TARGET lib_gtest PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/${LIBGTEST_FILENAME})
+-set_property(TARGET lib_gmock PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/${LIBGMOCK_FILENAME})
 -target_include_directories(lib_gtest INTERFACE ${INSTALL_DIR}/include)
+-target_include_directories(lib_gmock INTERFACE ${INSTALL_DIR}/include)
 -if(NOT MSVC)
 -    target_link_libraries(lib_gtest INTERFACE -lpthread)
+-    target_link_libraries(lib_gmock INTERFACE -lpthread)
 -endif()
--add_dependencies(lib_gtest proj_gtest)
--set_target_properties(lib_gtest proj_gtest PROPERTIES EXCLUDE_FROM_ALL TRUE)
 +#add_library(lib_gtest STATIC IMPORTED GLOBAL)
++#add_library(lib_gmock STATIC IMPORTED GLOBAL)
 +#set_property(TARGET lib_gtest PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/${LIBGTEST_FILENAME})
++#set_property(TARGET lib_gmock PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/${LIBGMOCK_FILENAME})
 +#target_include_directories(lib_gtest INTERFACE ${INSTALL_DIR}/include)
++#target_include_directories(lib_gmock INTERFACE ${INSTALL_DIR}/include)
 +#if(NOT MSVC)
 +#    target_link_libraries(lib_gtest INTERFACE -lpthread)
++#    target_link_libraries(lib_gmock INTERFACE -lpthread)
 +#endif()
-+#add_dependencies(lib_gtest proj_gtest)
-+#set_target_properties(lib_gtest proj_gtest PROPERTIES EXCLUDE_FROM_ALL TRUE)
+ 
+ add_dependencies(lib_gtest proj_gtest)
+ add_dependencies(lib_gmock proj_gtest)
+ set_target_properties(lib_gtest lib_gmock proj_gtest PROPERTIES EXCLUDE_FROM_ALL TRUE)
  
 -add_library(lib_injection STATIC
 -    libinjection/src/xss.c
@@ -185,8 +195,9 @@
  
  add_library(lib_radix STATIC
      radixlib/radixlib.c)
- target_include_directories(lib_radix INTERFACE ${PROJECT_SOURCE_DIR}/radixlib)
- set_target_properties(lib_radix PROPERTIES POSITION_INDEPENDENT_CODE 1)
+@@ -141,74 +141,74 @@ else ()
+     set(LIBUTF8PROC_FILENAME ${CMAKE_STATIC_LIBRARY_PREFIX}utf8proc${CMAKE_STATIC_LIBRARY_SUFFIX})
+ endif()
  
 -set(UTF8PROC_VERSION v2.7.0)
 -ExternalProject_Add(proj_utf8proc
@@ -202,6 +213,7 @@
 -    -DCMAKE_C_FLAGS_RELWITHDEBINFO=${CMAKE_C_FLAGS_RELWITHDEBINFO}
 -    -DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}
 -    -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
+-    BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/${LIBUTF8PROC_FILENAME}
 -)
 +#set(UTF8PROC_VERSION v2.7.0)
 +#ExternalProject_Add(proj_utf8proc
@@ -217,26 +229,38 @@
 +#    -DCMAKE_C_FLAGS_RELWITHDEBINFO=${CMAKE_C_FLAGS_RELWITHDEBINFO}
 +#    -DCMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}
 +#    -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
++#    BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/${LIBUTF8PROC_FILENAME}
 +#)
  
 -add_library(lib_utf8proc STATIC IMPORTED GLOBAL)
--if (MSVC)
--    set_property(TARGET lib_utf8proc PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}utf8proc_static${CMAKE_STATIC_LIBRARY_SUFFIX})
--else ()
--    set_property(TARGET lib_utf8proc PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}utf8proc${CMAKE_STATIC_LIBRARY_SUFFIX})
--endif()
+-set_property(TARGET lib_utf8proc PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/${LIBUTF8PROC_FILENAME})
 -target_include_directories(lib_utf8proc INTERFACE ${INSTALL_DIR}/include)
 -add_dependencies(lib_utf8proc proj_utf8proc)
 +#add_library(lib_utf8proc STATIC IMPORTED GLOBAL)
-+#if (MSVC)
-+#    set_property(TARGET lib_utf8proc PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}utf8proc_static${CMAKE_STATIC_LIBRARY_SUFFIX})
-+#else ()
-+#    set_property(TARGET lib_utf8proc PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}utf8proc${CMAKE_STATIC_LIBRARY_SUFFIX})
-+#endif()
++#set_property(TARGET lib_utf8proc PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/${LIBUTF8PROC_FILENAME})
 +#target_include_directories(lib_utf8proc INTERFACE ${INSTALL_DIR}/include)
 +#add_dependencies(lib_utf8proc proj_utf8proc)
  
  # yaml-cpp
+-if (NOT MSVC)
+-    if(CMAKE_BUILD_TYPE MATCHES Debug)
+-        set(LIBYAML_FILENAME libyaml-cppd${CMAKE_STATIC_LIBRARY_SUFFIX})
+-    else()
+-        set(LIBYAML_FILENAME libyaml-cpp${CMAKE_STATIC_LIBRARY_SUFFIX})
+-    endif()
+-else()
+-    set(LIBYAML_FILENAME yaml-cpp${CMAKE_STATIC_LIBRARY_SUFFIX})
+-endif()
++#if (NOT MSVC)
++#    if(CMAKE_BUILD_TYPE MATCHES Debug)
++#        set(LIBYAML_FILENAME libyaml-cppd${CMAKE_STATIC_LIBRARY_SUFFIX})
++#    else()
++#        set(LIBYAML_FILENAME libyaml-cpp${CMAKE_STATIC_LIBRARY_SUFFIX})
++#    endif()
++#else()
++#    set(LIBYAML_FILENAME yaml-cpp${CMAKE_STATIC_LIBRARY_SUFFIX})
++#endif()
+ 
 -ExternalProject_Add(proj_yamlcpp
 -    URL https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-0.7.0.zip
 -    INSTALL_DIR       ${INSTALL_DIR}
@@ -256,17 +280,13 @@
 -                -DYAML_MSVC_SHARED_RT=OFF
 -                -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
 -                -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
+-                BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/${LIBYAML_FILENAME}
 -)
 -add_library(lib_yamlcpp STATIC IMPORTED GLOBAL)
--if (NOT MSVC)
--    if(CMAKE_BUILD_TYPE MATCHES Debug)
--        set(LIBYAML_FILENAME libyaml-cppd${CMAKE_STATIC_LIBRARY_SUFFIX})
--    else()
--        set(LIBYAML_FILENAME libyaml-cpp${CMAKE_STATIC_LIBRARY_SUFFIX})
--    endif()
--else()
--    set(LIBYAML_FILENAME yaml-cpp${CMAKE_STATIC_LIBRARY_SUFFIX})
--endif()
+-set_target_properties(lib_yamlcpp PROPERTIES  IMPORTED_LOCATION ${INSTALL_DIR}/lib/${LIBYAML_FILENAME})
+-target_include_directories(lib_yamlcpp INTERFACE ${INSTALL_DIR}/include)
+-add_dependencies(lib_yamlcpp proj_yamlcpp)
+-set_target_properties(lib_yamlcpp proj_yamlcpp PROPERTIES EXCLUDE_FROM_ALL TRUE)
 +#ExternalProject_Add(proj_yamlcpp
 +#    URL https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-0.7.0.zip
 +#    INSTALL_DIR       ${INSTALL_DIR}
@@ -286,22 +306,9 @@
 +#                -DYAML_MSVC_SHARED_RT=OFF
 +#                -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
 +#                -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
++#                BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/${LIBYAML_FILENAME}
 +#)
 +#add_library(lib_yamlcpp STATIC IMPORTED GLOBAL)
-+#if (NOT MSVC)
-+#    if(CMAKE_BUILD_TYPE MATCHES Debug)
-+#        set(LIBYAML_FILENAME libyaml-cppd${CMAKE_STATIC_LIBRARY_SUFFIX})
-+#    else()
-+#        set(LIBYAML_FILENAME libyaml-cpp${CMAKE_STATIC_LIBRARY_SUFFIX})
-+#    endif()
-+#else()
-+#    set(LIBYAML_FILENAME yaml-cpp${CMAKE_STATIC_LIBRARY_SUFFIX})
-+#endif()
- 
--set_target_properties(lib_yamlcpp PROPERTIES  IMPORTED_LOCATION ${INSTALL_DIR}/lib/${LIBYAML_FILENAME})
--target_include_directories(lib_yamlcpp INTERFACE ${INSTALL_DIR}/include)
--add_dependencies(lib_yamlcpp proj_yamlcpp)
--set_target_properties(lib_yamlcpp proj_yamlcpp PROPERTIES EXCLUDE_FROM_ALL TRUE)
 +#set_target_properties(lib_yamlcpp PROPERTIES  IMPORTED_LOCATION ${INSTALL_DIR}/lib/${LIBYAML_FILENAME})
 +#target_include_directories(lib_yamlcpp INTERFACE ${INSTALL_DIR}/include)
 +#add_dependencies(lib_yamlcpp proj_yamlcpp)