diff --git a/CMakeLists.txt b/CMakeLists.txt index fe4551c9..727cb2ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -485,7 +485,7 @@ if(OCOS_ENABLE_BLINGFIRE) endif() if(OCOS_ENABLE_GPT2_TOKENIZER OR OCOS_ENABLE_WORDPIECE_TOKENIZER) - target_include_directories(ocos_operators PRIVATE ${json_SOURCE_DIR}/single_include) + target_include_directories(ocos_operators PRIVATE ${nlohmann_json_SOURCE_DIR}/single_include) list(APPEND ocos_libraries nlohmann_json::nlohmann_json) endif() diff --git a/cmake/externals/json.cmake b/cmake/externals/json.cmake index 32f08567..9e9f179b 100644 --- a/cmake/externals/json.cmake +++ b/cmake/externals/json.cmake @@ -1,11 +1,11 @@ -FetchContent_Declare(json +FetchContent_Declare(nlohmann_json GIT_REPOSITORY https://github.com/nlohmann/json.git GIT_TAG v3.10.5) set(JSON_BuildTests OFF CACHE INTERNAL "") -FetchContent_GetProperties(json) -if(NOT json_POPULATED) - FetchContent_Populate(json) - add_subdirectory(${json_SOURCE_DIR} ${json_BINARY_DIR} EXCLUDE_FROM_ALL) +FetchContent_GetProperties(nlohmann_json) +if(NOT nlohmann_json_POPULATED) + FetchContent_Populate(nlohmann_json) + add_subdirectory(${nlohmann_json_SOURCE_DIR} ${nlohmann_json_BINARY_DIR} EXCLUDE_FROM_ALL) endif()