Skip to content

Commit

Permalink
Fix: simdjson version 3.6.3 not 3.3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
spnda committed Jan 17, 2024
1 parent 3dd326e commit dee46c0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ else()
target_link_libraries(fastgltf PRIVATE simdjson::simdjson)
else()
# Download and configure simdjson
set(SIMDJSON_TARGET_VERSION "3.3.6")
set(SIMDJSON_TARGET_VERSION "3.6.3")
set(SIMDJSON_DL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/deps/simdjson")
file(MAKE_DIRECTORY ${SIMDJSON_DL_DIR})

Expand All @@ -63,6 +63,11 @@ else()
file(STRINGS ${SIMDJSON_HEADER_FILE} SIMDJSON_HEADER_VERSION_LINE REGEX "^#define SIMDJSON_VERSION ")
string(REGEX MATCHALL "[0-9.]+" SIMDJSON_HEADER_VERSION "${SIMDJSON_HEADER_VERSION_LINE}")
message(STATUS "fastgltf: Found simdjson (Version ${SIMDJSON_HEADER_VERSION})")

if (SIMDJSON_HEADER_VERSION STREQUAL "")
message(FATAL_ERROR "fastgltf: Failed to download simdjson")
endif()

if (SIMDJSON_HEADER_VERSION VERSION_LESS SIMDJSON_TARGET_VERSION)
message(STATUS "fastgltf: simdjson outdated, downloading...")
download_simdjson()
Expand Down

0 comments on commit dee46c0

Please sign in to comment.