Commit 41cab321 authored by Magnus Blåudd's avatar Magnus Blåudd

WL#5665: Removal of the autotools-based build system

 - Make the cmake files depend on VERSION, causing
   cmake rerun when VERSION changes
parent 7bf81b15
...@@ -21,17 +21,21 @@ SET(SHARED_LIB_MAJOR_VERSION "16") ...@@ -21,17 +21,21 @@ SET(SHARED_LIB_MAJOR_VERSION "16")
SET(PROTOCOL_VERSION "10") SET(PROTOCOL_VERSION "10")
SET(DOT_FRM_VERSION "6") SET(DOT_FRM_VERSION "6")
# Generate "something" to trigger cmake rerun when VERSION changes
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/VERSION
${CMAKE_BINARY_DIR}/VERSION.dep
)
# Read value for a variable from VERSION. # Read value for a variable from VERSION.
MACRO(MYSQL_GET_CONFIG_VALUE keyword var) MACRO(MYSQL_GET_CONFIG_VALUE keyword var)
IF(NOT ${var}) IF(NOT ${var})
IF (EXISTS ${CMAKE_SOURCE_DIR}/VERSION) FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION str REGEX "^[ ]*${keyword}=")
FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION str REGEX "^[ ]*${keyword}=") IF(str)
IF(str) STRING(REPLACE "${keyword}=" "" str ${str})
STRING(REPLACE "${keyword}=" "" str ${str}) STRING(REGEX REPLACE "[ ].*" "" str "${str}")
STRING(REGEX REPLACE "[ ].*" "" str "${str}") SET(${var} ${str})
SET(${var} ${str})
ENDIF()
ENDIF() ENDIF()
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment