From b808861c25bea534f84d6c12663ce11c1fdc2eb8 Mon Sep 17 00:00:00 2001 From: Ghislain Antony Vaillant Date: Sat, 28 Jan 2017 17:32:39 +0000 Subject: [PATCH] Capture multi-digit version numbers --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1de241ab..35055a06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,10 +49,10 @@ list (GET OPENSHOT_VERSION_LINES 2 LINE_BUILD) list (GET OPENSHOT_VERSION_LINES 3 LINE_SO) #### Get the version number out of each line -STRING(REGEX REPLACE "#define[ ]+OPENSHOT_VERSION_MAJOR.*([0-9])+;(.*)" "\\1" MAJOR_VERSION "${LINE_MAJOR}") -STRING(REGEX REPLACE "#define[ ]+OPENSHOT_VERSION_MINOR.*([0-9])+;(.*)" "\\1" MINOR_VERSION "${LINE_MINOR}") -STRING(REGEX REPLACE "#define[ ]+OPENSHOT_VERSION_BUILD.*([0-9])+;(.*)" "\\1" BUILD_VERSION "${LINE_BUILD}") -STRING(REGEX REPLACE "#define[ ]+OPENSHOT_VERSION_SO.*([0-9])+;(.*)" "\\1" SO_VERSION "${LINE_SO}") +STRING(REGEX REPLACE "#define[ ]+OPENSHOT_VERSION_MAJOR[ ]+([0-9]+);(.*)" "\\1" MAJOR_VERSION "${LINE_MAJOR}") +STRING(REGEX REPLACE "#define[ ]+OPENSHOT_VERSION_MINOR[ ]+([0-9]+);(.*)" "\\1" MINOR_VERSION "${LINE_MINOR}") +STRING(REGEX REPLACE "#define[ ]+OPENSHOT_VERSION_BUILD[ ]+([0-9]+);(.*)" "\\1" BUILD_VERSION "${LINE_BUILD}") +STRING(REGEX REPLACE "#define[ ]+OPENSHOT_VERSION_SO[ ]+([0-9]+);(.*)" "\\1" SO_VERSION "${LINE_SO}") set(PROJECT_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${BUILD_VERSION}") MESSAGE("--> MAJOR Version: ${MAJOR_VERSION}") @@ -84,4 +84,4 @@ add_subdirectory(tests) include(cmake/Modules/UseDoxygen.cmake) file(GLOB_RECURSE doc_files ${CMAKE_CURRENT_BINARY_DIR}/doc/html/*.*) -INSTALL(FILES ${doc_files} DESTINATION share/doc/libopenshot) \ No newline at end of file +INSTALL(FILES ${doc_files} DESTINATION share/doc/libopenshot)