summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/bison.cmake4
-rw-r--r--cmake/make_dist.cmake.in3
2 files changed, 5 insertions, 2 deletions
diff --git a/cmake/bison.cmake b/cmake/bison.cmake
index 0892a213d04..0e4a7b58a13 100644
--- a/cmake/bison.cmake
+++ b/cmake/bison.cmake
@@ -40,7 +40,7 @@ ELSEIF(BISON_EXECUTABLE AND NOT BISON_USABLE)
ENDIF()
# Use bison to generate C++ and header file
-MACRO (RUN_BISON input_yy output_cc output_h)
+MACRO (RUN_BISON input_yy output_cc output_h name_prefix)
IF(BISON_TOO_OLD)
IF(EXISTS ${output_cc} AND EXISTS ${output_h})
SET(BISON_USABLE FALSE)
@@ -65,7 +65,7 @@ MACRO (RUN_BISON input_yy output_cc output_h)
ADD_CUSTOM_COMMAND(
OUTPUT ${output_cc}
${output_h}
- COMMAND ${BISON_EXECUTABLE} -y -p MYSQL
+ COMMAND ${BISON_EXECUTABLE} -y -p ${name_prefix}
--output=${output_cc}
--defines=${output_h}
${input_yy}
diff --git a/cmake/make_dist.cmake.in b/cmake/make_dist.cmake.in
index 3cc93d10fb8..6bd71cc7653 100644
--- a/cmake/make_dist.cmake.in
+++ b/cmake/make_dist.cmake.in
@@ -52,6 +52,9 @@ IF(GIT_EXECUTABLE)
ENDIF()
ENDIF()
+CONFIGURE_FILE(${CMAKE_BINARY_DIR}/include/source_revision.h
+ ${PACKAGE_DIR}/include/source_revision.h COPYONLY)
+
IF(NOT GIT_EXECUTABLE)
MESSAGE(STATUS "git not found or source dir is not a repo, use CPack")