Skip to content

Commit

Permalink
Regex match Make.inc to match CMake version with Autotools version
Browse files Browse the repository at this point in the history
  • Loading branch information
ViliusSutkus89 committed Jun 22, 2024
1 parent 3335ebc commit c1e8462
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
cmake_minimum_required(VERSION 3.25)

# Get version string from Make.inc
file(READ "${CMAKE_CURRENT_LIST_DIR}/Make.inc" MAKE_FILE)
string(REGEX MATCH "VERSION = ([0-9\.]+)" _ ${MAKE_FILE})

project(openlibm
VERSION 0.8.4
VERSION ${CMAKE_MATCH_1}
LANGUAGES C ASM)

option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
Expand Down

0 comments on commit c1e8462

Please sign in to comment.