mirror of
https://github.com/eosswedenorg/antelope-keygen
synced 2026-07-04 12:03:41 +02:00
CMakeModules/libeoskeygen.cmake: handle custom libeoskeygen via LIBEOSKEYGEN_SOURCE_DIR variable correctly.
by include()'ing the targets file. cmake only knows how to link but not to build. The proper ways is to use add_subdirectory()
This commit is contained in:
parent
1924feacb0
commit
47767e3443
1 changed files with 7 additions and 8 deletions
|
|
@ -21,15 +21,15 @@ macro(fromGit tag)
|
||||||
FetchContent_MakeAvailable(libeoskeygen)
|
FetchContent_MakeAvailable(libeoskeygen)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
# If we have a custom libeoskeygen
|
macro(buildLocal src)
|
||||||
if(CUSTOM_LIBEOSKEYGEN)
|
message ("Using local libeoskeygen at: ${src}")
|
||||||
|
add_subdirectory(${src} ${src}/build)
|
||||||
|
endmacro()
|
||||||
|
|
||||||
message ("Using libeoskeygen in: ${CUSTOM_LIBEOSKEYGEN}")
|
# If we have a local libeoskeygen
|
||||||
|
if (LIBEOSKEYGEN_SOURCE_DIR)
|
||||||
# Include targets.
|
buildLocal( ${LIBEOSKEYGEN_SOURCE_DIR} )
|
||||||
include(${CUSTOM_LIBEOSKEYGEN}/libeoskeygenTargets.cmake)
|
|
||||||
else()
|
else()
|
||||||
|
|
||||||
# Try finding the package on the system.
|
# Try finding the package on the system.
|
||||||
find_package(libeoskeygen ${LIBEOSKEYGEN_WANTED_VERSION} QUIET)
|
find_package(libeoskeygen ${LIBEOSKEYGEN_WANTED_VERSION} QUIET)
|
||||||
if (libeoskeygen_FOUND)
|
if (libeoskeygen_FOUND)
|
||||||
|
|
@ -38,5 +38,4 @@ else()
|
||||||
else()
|
else()
|
||||||
fromGit( v${LIBEOSKEYGEN_WANTED_VERSION} )
|
fromGit( v${LIBEOSKEYGEN_WANTED_VERSION} )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue