aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/genrev.cmake16
-rw-r--r--cmake/macros/FindMySQL.cmake2
-rw-r--r--cmake/macros/FindOpenSSL.cmake2
3 files changed, 10 insertions, 10 deletions
diff --git a/cmake/genrev.cmake b/cmake/genrev.cmake
index c34e9d75973..1f5f02ceeec 100644
--- a/cmake/genrev.cmake
+++ b/cmake/genrev.cmake
@@ -12,21 +12,19 @@
# This is done EACH compile so they can be alerted about the consequences.
if(NOT BUILDDIR)
- # Workaround for funny MSVC behaviour - this segment only run during compile
- set(NO_GIT ${WITHOUT_GIT})
- set(GIT_EXEC ${GIT_EXECUTABLE})
+ # Workaround for funny MSVC behaviour - this segment is only used when using cmake gui
set(BUILDDIR ${CMAKE_BINARY_DIR})
endif()
-if(NO_GIT)
+if(WITHOUT_GIT)
set(rev_date "1970-01-01 00:00:00 +0000")
set(rev_hash "unknown")
set(rev_branch "Archived")
else()
- if(GIT_EXEC)
+ if(GIT_EXECUTABLE)
# Create a revision-string that we can use
execute_process(
- COMMAND "${GIT_EXEC}" describe --match init --dirty=+ --abbrev=12
+ COMMAND "${GIT_EXECUTABLE}" describe --match init --dirty=+ --abbrev=12
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE rev_info
OUTPUT_STRIP_TRAILING_WHITESPACE
@@ -35,7 +33,7 @@ else()
# And grab the commits timestamp
execute_process(
- COMMAND "${GIT_EXEC}" show -s --format=%ci
+ COMMAND "${GIT_EXECUTABLE}" show -s --format=%ci
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE rev_date
OUTPUT_STRIP_TRAILING_WHITESPACE
@@ -44,7 +42,7 @@ else()
# Also retrieve branch name
execute_process(
- COMMAND "${GIT_EXEC}" rev-parse --abbrev-ref HEAD
+ COMMAND "${GIT_EXECUTABLE}" rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE rev_branch
OUTPUT_STRIP_TRAILING_WHITESPACE
@@ -69,7 +67,7 @@ else()
endif()
# Create the actual revision.h file from the above params
-if(NOT "${rev_hash_cached}" MATCHES "${rev_hash}" OR NOT "${rev_branch_cached}" MATCHES "${rev_branch}")
+if(NOT "${rev_hash_cached}" MATCHES "${rev_hash}" OR NOT "${rev_branch_cached}" MATCHES "${rev_branch}" OR NOT EXISTS "${BUILDDIR}/revision.h")
configure_file(
"${CMAKE_SOURCE_DIR}/revision.h.in.cmake"
"${BUILDDIR}/revision.h"
diff --git a/cmake/macros/FindMySQL.cmake b/cmake/macros/FindMySQL.cmake
index 2c393463c47..990f4918d6a 100644
--- a/cmake/macros/FindMySQL.cmake
+++ b/cmake/macros/FindMySQL.cmake
@@ -94,6 +94,7 @@ find_path(MYSQL_INCLUDE_DIR
"$ENV{ProgramFiles}/MySQL/*/include"
"$ENV{SystemDrive}/MySQL/*/include"
"c:/msys/local/include"
+ "$ENV{MYSQL_ROOT}/include"
DOC
"Specify the directory containing mysql.h."
)
@@ -159,6 +160,7 @@ if( WIN32 )
"$ENV{ProgramFiles}/MySQL/*/lib/opt"
"$ENV{SystemDrive}/MySQL/*/lib/opt"
"c:/msys/local/include"
+ "$ENV{MYSQL_ROOT}/lib"
DOC "Specify the location of the mysql library here."
)
endif( WIN32 )
diff --git a/cmake/macros/FindOpenSSL.cmake b/cmake/macros/FindOpenSSL.cmake
index 1cc34b36a4c..7baa43274ab 100644
--- a/cmake/macros/FindOpenSSL.cmake
+++ b/cmake/macros/FindOpenSSL.cmake
@@ -186,7 +186,7 @@ if (OPENSSL_INCLUDE_DIR)
set(OPENSSL_VERSION "${_OPENSSL_VERSION}")
else (_OPENSSL_VERSION)
file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str
- REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9][0-9][0-9][0-9].*")
+ REGEX "^# *define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9][0-9][0-9][0-9].*")
# The version number is encoded as 0xMNNFFPPS: major minor fix patch status
# The status gives if this is a developer or prerelease and is ignored here.