mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2025-12-18 14:34:24 +01:00
43 lines
1.5 KiB
CMake
43 lines
1.5 KiB
CMake
set(TagName "v0.3.3") # generated; do not edit
|
|
set(LibraryVersion "breez_liquid-${TagName}")
|
|
|
|
# TODO Remove this workaround once Flutter supports Windows ARM.
|
|
# https://github.com/flutter/flutter/issues/116196
|
|
set(FLUTTER_TARGET_PLATFORM windows-x64)
|
|
|
|
# The Flutter tooling requires that developers have a version of Visual Studio
|
|
# installed that includes CMake 3.14 or later. You should not increase this
|
|
# version, as doing so will cause the plugin to fail to compile for some
|
|
# customers of the plugin.
|
|
cmake_minimum_required(VERSION 3.14)
|
|
|
|
# Project-level configuration.
|
|
set(PROJECT_NAME "flutter_breez_liquid")
|
|
project(${PROJECT_NAME} LANGUAGES CXX)
|
|
|
|
# Download the binaries if they are not already present.
|
|
set(LibRoot "${CMAKE_CURRENT_SOURCE_DIR}/${LibraryVersion}")
|
|
set(ArchivePath "${LibRoot}.tar.gz")
|
|
if(NOT EXISTS ${ArchivePath})
|
|
file(DOWNLOAD
|
|
"https://github.com/breez/breez-sdk-liquid-flutter/releases/download/${TagName}/other.tar.gz"
|
|
${ArchivePath}
|
|
TLS_VERIFY ON
|
|
)
|
|
endif()
|
|
|
|
# Extract the binaries, overriding any already present.
|
|
file(REMOVE_RECURSE ${LibRoot})
|
|
file(MAKE_DIRECTORY ${LibRoot})
|
|
execute_process(
|
|
COMMAND ${CMAKE_COMMAND} -E tar xzf ${ArchivePath}
|
|
WORKING_DIRECTORY ${LibRoot}
|
|
)
|
|
|
|
# List of absolute paths to libraries that should be bundled with the plugin.
|
|
# This list could contain prebuilt libraries, or libraries created by an
|
|
# external build triggered from this build file.
|
|
set(flutter_breez_liquid_bundled_libraries
|
|
"${LibRoot}/${FLUTTER_TARGET_PLATFORM}/breez_sdk_liquid.dll"
|
|
PARENT_SCOPE
|
|
) |