Skip to content

Commit

Permalink
FRICLIENT_VERSION -> FRI_CLIENT_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
mhubii committed Sep 7, 2024
1 parent acac2f2 commit f6aa7c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ message("Found nanopb of version: " ${NANOPB_VERSION})
file(READ ${CMAKE_CURRENT_BINARY_DIR}/${FRIClient_SDK_NAME}/include/friClientIf.h FRI_CLIENT_IF_HEADER)
string(REGEX MATCH "version \\{([0-9]+)\\.([0-9]+)" _ ${FRI_CLIENT_IF_HEADER})

set(FRICLIENT_VERSION_MAJOR ${CMAKE_MATCH_1})
set(FRICLIENT_VERSION_MINOR ${CMAKE_MATCH_2})
set(FRICLIENT_VERSION ${FRICLIENT_VERSION_MAJOR}.${FRICLIENT_VERSION_MINOR})
set(FRI_CLIENT_VERSION_MAJOR ${CMAKE_MATCH_1})
set(FRI_CLIENT_VERSION_MINOR ${CMAKE_MATCH_2})
set(FRI_CLIENT_VERSION ${FRI_CLIENT_VERSION_MAJOR}.${FRI_CLIENT_VERSION_MINOR})

if (NOT FRICLIENT_VERSION STREQUAL "1.15")
message(FATAL_ERROR "Expected FRIClient version 1.15, found: " ${FRICLIENT_VERSION})
if (NOT FRI_CLIENT_VERSION STREQUAL "1.15")
message(FATAL_ERROR "Expected FRIClient version 1.15, found: " ${FRI_CLIENT_VERSION})
endif()

message("Found FRIClient of version: " ${FRICLIENT_VERSION})
message("Found FRIClient of version: " ${FRI_CLIENT_VERSION})

# create version header
configure_file(
Expand Down Expand Up @@ -132,7 +132,7 @@ include(CMakePackageConfigHelpers)

write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/FRIClientConfigVersion.cmake"
VERSION ${FRICLIENT_VERSION}
VERSION ${FRI_CLIENT_VERSION}
COMPATIBILITY SameMajorVersion
)

Expand Down
4 changes: 2 additions & 2 deletions friVersion.h.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef FRI_VERSION_H
#define FRI_VERSION_H

#define FRICLIENT_VERSION_MAJOR @FRICLIENT_VERSION_MAJOR@
#define FRICLIENT_VERSION_MINOR @FRICLIENT_VERSION_MINOR@
#define FRI_CLIENT_VERSION_MAJOR @FRI_CLIENT_VERSION_MAJOR@
#define FRI_CLIENT_VERSION_MINOR @FRI_CLIENT_VERSION_MINOR@

#endif // FRI_VERSION_H

0 comments on commit f6aa7c7

Please sign in to comment.