1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-keygen synced 2026-07-03 11:53:41 +02:00

CMakeModules/libeoskeygen.cmake: allow LIBEOSKEYGEN_WANTED_VERSION to contain a git branch.

This commit is contained in:
Henrik Hautakoski 2020-03-25 18:47:49 +01:00
parent cf082919cc
commit 9f28dfcc29

View file

@ -30,12 +30,19 @@ endmacro()
if (LIBEOSKEYGEN_SOURCE_DIR) if (LIBEOSKEYGEN_SOURCE_DIR)
buildLocal( ${LIBEOSKEYGEN_SOURCE_DIR} ) buildLocal( ${LIBEOSKEYGEN_SOURCE_DIR} )
else() else()
# Try finding the package on the system.
find_package(libeoskeygen ${LIBEOSKEYGEN_WANTED_VERSION} QUIET) # Check if version is in fact a version.
if (libeoskeygen_FOUND) if (LIBEOSKEYGEN_WANTED_VERSION MATCHES "^[0-9]+(.[0-9]+)?(.[0-9]+)(-[a-zA-Z0-9]+)?$")
message ("Using libeoskeygen in: ${libeoskeygen_DIR}") # Try finding the package on the system.
# Not found, download from git. find_package(libeoskeygen ${LIBEOSKEYGEN_WANTED_VERSION} QUIET)
if (libeoskeygen_FOUND)
message ("Using libeoskeygen in: ${libeoskeygen_DIR}")
# Not found, download from git.
else()
fromGit( v${LIBEOSKEYGEN_WANTED_VERSION} )
endif()
# Assume version contains a git branch.
else() else()
fromGit( v${LIBEOSKEYGEN_WANTED_VERSION} ) fromGit( ${LIBEOSKEYGEN_WANTED_VERSION} )
endif() endif()
endif() endif()