Skip to content

Commit

Permalink
Rename variable PACKAGE_JSON_CONTENT to `CLP_FFI_JS_PACKAGE_JSON_CO…
Browse files Browse the repository at this point in the history
…NTENT`.
  • Loading branch information
junhaoliao committed Dec 29, 2024
1 parent 6149836 commit 897eb50
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ endif()

# Extract the project name & version from package.json
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/package.json")
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/package.json" PACKAGE_JSON_CONTENT)
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/package.json" CLP_FFI_JS_PACKAGE_JSON_CONTENT)
else()
message(FATAL_ERROR "`package.json` not found in ${CMAKE_CURRENT_SOURCE_DIR}")
endif()
if("${PACKAGE_JSON_CONTENT}" MATCHES "\"name\":[ ]*\"([^\"]+)\"")
if("${CLP_FFI_JS_PACKAGE_JSON_CONTENT}" MATCHES "\"name\":[ ]*\"([^\"]+)\"")
set(CLP_FFI_JS_PROJECT_NAME
"${CMAKE_MATCH_1}"
CACHE STRING
Expand All @@ -25,7 +25,7 @@ if("${PACKAGE_JSON_CONTENT}" MATCHES "\"name\":[ ]*\"([^\"]+)\"")
else()
set(CLP_FFI_JS_PROJECT_NAME "clp-ffi-js" CACHE STRING "Use a placeholder project name." FORCE)
endif()
if("${PACKAGE_JSON_CONTENT}" MATCHES "\"version\":[ ]*\"([^\"]+)\"")
if("${CLP_FFI_JS_PACKAGE_JSON_CONTENT}" MATCHES "\"version\":[ ]*\"([^\"]+)\"")
set(CLP_FFI_JS_VERSION
"${CMAKE_MATCH_1}"
CACHE STRING
Expand Down

0 comments on commit 897eb50

Please sign in to comment.