1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-keygen synced 2026-06-18 04:00:03 +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)
buildLocal( ${LIBEOSKEYGEN_SOURCE_DIR} )
else()
# Try finding the package on the system.
find_package(libeoskeygen ${LIBEOSKEYGEN_WANTED_VERSION} QUIET)
if (libeoskeygen_FOUND)
message ("Using libeoskeygen in: ${libeoskeygen_DIR}")
# Not found, download from git.
# Check if version is in fact a version.
if (LIBEOSKEYGEN_WANTED_VERSION MATCHES "^[0-9]+(.[0-9]+)?(.[0-9]+)(-[a-zA-Z0-9]+)?$")
# Try finding the package on the system.
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()
fromGit( v${LIBEOSKEYGEN_WANTED_VERSION} )
fromGit( ${LIBEOSKEYGEN_WANTED_VERSION} )
endif()
endif()