vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nlohmann/json REF v3.10.4 SHA512 f78592db6218165cbc74c10bcba40366f1bfea84405b7ee25fe97a056d5b7a15aeeb956d93296673928dcbd6e26ffcfb152f885b4a44d5d55751396ccf090835 HEAD_REF master ) vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DJSON_Install=ON -DJSON_MultipleHeaders=ON -DJSON_BuildTests=OFF ) vcpkg_cmake_install() vcpkg_cmake_config_fixup(PACKAGE_NAME "nlohmann_json" CONFIG_PATH "lib/cmake/nlohmann_json") vcpkg_fixup_pkgconfig() vcpkg_replace_string( "${CURRENT_PACKAGES_DIR}/share/nlohmann_json/nlohmann_jsonTargets.cmake" "{_IMPORT_PREFIX}/nlohmann_json.natvis" "{_IMPORT_PREFIX}/share/nlohmann_json/nlohmann_json.natvis" ) if(EXISTS ${CURRENT_PACKAGES_DIR}/nlohmann_json.natvis) file(RENAME "${CURRENT_PACKAGES_DIR}/nlohmann_json.natvis" "${CURRENT_PACKAGES_DIR}/share/nlohmann_json/nlohmann_json.natvis" ) endif() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/nlohmann_json.natvis") # Handle copyright file(INSTALL "${SOURCE_PATH}/LICENSE.MIT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)