Skip to content

Commit

Permalink
Clean up hardcoded hex version slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdnyc committed Jul 7, 2019
1 parent b6f0507 commit 36917e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules")
################ PROJECT VERSION ####################
set(PROJECT_VERSION_FULL "0.1.8-dev1")
set(PROJECT_SO_VERSION 6)
set(HEX_VERSION_OVERRIDE "0x108") # For CMake < 3.13

# Remove the dash and anything following, to get the #.#.# version for project()
STRING(REGEX REPLACE "\-.*$" "" VERSION_NUM "${PROJECT_VERSION_FULL}")
Expand All @@ -57,7 +58,7 @@ PROJECT(libopenshot-audio LANGUAGES C CXX VERSION ${VERSION_NUM})

# JuceHeader.h needs a hexadecimal version number for the project
if(CMAKE_VERSION VERSION_LESS 3.13)
set(PROJECT_VERSION_HEX "0x108") # Ugly hardcoding
set(PROJECT_VERSION_HEX ${HEX_VERSION_OVERRIDE}) # Ugly hardcoding
else()
math(EXPR PROJECT_VERSION_HEX
"(${PROJECT_VERSION_MAJOR} << 16) + \
Expand Down

0 comments on commit 36917e4

Please sign in to comment.