6
6
7
7
include (FetchContent)
8
8
9
- FetchContent_Declare(nlohmann_json
10
- URL https://github.com/nlohmann/json/archive/refs/tags/v3.11.3.tar.gz
11
- URL_HASH SHA256=0d8ef5af7f9794e3263480193c491549b2ba6cc74bb018906202ada498a79406)
12
- FetchContent_MakeAvailable(nlohmann_json)
9
+ if (NOT TARGET nlohmann_json)
10
+ FetchContent_Declare(nlohmann_json
11
+ URL https://github.com/nlohmann/json/archive/refs/tags/v3.11.3.tar.gz
12
+ URL_HASH SHA256=0d8ef5af7f9794e3263480193c491549b2ba6cc74bb018906202ada498a79406)
13
+ FetchContent_MakeAvailable(nlohmann_json)
14
+ endif ()
13
15
14
16
function (ov_genai_build_jinja2cpp)
15
17
FetchContent_Declare(jinja2cpp
@@ -56,7 +58,7 @@ set_target_properties(${TARGET_NAME} PROPERTIES
56
58
LIBRARY_OUTPUT_DIRECTORY "$<1:${CMAKE_BINARY_DIR} /openvino_genai/>"
57
59
RUNTIME_OUTPUT_DIRECTORY "$<1:${CMAKE_BINARY_DIR} /openvino_genai/>"
58
60
)
59
- # Extract two last digits from CMAKE_PROJECT_VERSION_MAJOR because SOVERSION can only contain up to 4 symbols.
61
+ # Extract two last digits from OpenVINOGenAI_PROJECT_VERSION_MAJOR because SOVERSION can only contain up to 4 symbols.
60
62
string (REGEX MATCH [=[[0-9][0-9]$]=] MAJOR_SUFFIX ${OpenVINOGenAI_VERSION_MAJOR} )
61
63
if (DEFINED PY_BUILD_CMAKE_PACKAGE_NAME AND LINUX)
62
64
# Don't pack symlinks but append version hash to the name for wheel
@@ -67,7 +69,7 @@ elseif(DEFINED PY_BUILD_CMAKE_PACKAGE_NAME AND APPELE)
67
69
SUFFIX .${MAJOR_SUFFIX}${OpenVINOGenAI_VERSION_MINOR}${OpenVINOGenAI_VERSION_PATCH}${CMAKE_SHARED_LIBRARY_SUFFIX} )
68
70
else ()
69
71
set_target_properties (${TARGET_NAME} PROPERTIES
70
- VERSION ${CMAKE_PROJECT_VERSION }
72
+ VERSION ${OpenVINOGenAI_PROJECT_VERSION }
71
73
SOVERSION ${MAJOR_SUFFIX}${OpenVINOGenAI_VERSION_MINOR}${OpenVINOGenAI_VERSION_PATCH} )
72
74
endif ()
73
75
0 commit comments