Skip to content

Commit

Permalink
cmake: fix bug in STRING REPLACE
Browse files Browse the repository at this point in the history
The last argument of STRING REPLACE, which is a variable, has to be
inside double quotes otherwise it may be misinterpreted.
  • Loading branch information
JonasVautherin committed Feb 14, 2019
1 parent 3ca0ec9 commit 164992b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -69,7 +69,7 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE
)

STRING(REGEX REPLACE v\([0-9]+.[0-9]+.[0-9]+.*$\) \\1 VERSION_STR ${VERSION_STR})
STRING(REGEX REPLACE v\([0-9]+.[0-9]+.[0-9]+.*$\) \\1 VERSION_STR "${VERSION_STR}")

message(STATUS "Version: ${VERSION_STR}")
add_definitions(-DDRONECODE_SDK_VERSION="${VERSION_STR}")
Expand Down

0 comments on commit 164992b

Please sign in to comment.