From 754a9687067865b3b8e7d7d3cfa474048dab07a1 Mon Sep 17 00:00:00 2001 From: xiphon Date: Fri, 15 May 2020 02:24:14 +0000 Subject: [PATCH] build: release-win64 support --- CMakeLists.txt | 6 ++++-- Makefile | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a6e30f13..835232a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,8 +8,7 @@ set(VERSION_MINOR "0") set(VERSION_REVISION "3") set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}") -# libwallet requires a static build, so we only allow static compilation -set(STATIC ON) +option(STATIC "Link libraries statically, requires static Qt") option(USE_DEVICE_TREZOR ON) option(ENABLE_PASS_STRENGTH_METER "Disable zxcvbn" OFF) @@ -75,7 +74,10 @@ if(GIT_FOUND) endif() endif() +set(STATIC_OLD ${STATIC}) +set(STATIC ON CACHE BOOL "Link libraries statically" FORCE) add_subdirectory(monero) +set(STATIC ${STATIC_OLD} CACHE BOOL "Link libraries statically" FORCE) set_property(TARGET wallet_merged PROPERTY FOLDER "monero") get_directory_property(ARCH_WIDTH DIRECTORY "monero" DEFINITION ARCH_WIDTH) diff --git a/Makefile b/Makefile index 4ceee188..117b3e7e 100644 --- a/Makefile +++ b/Makefile @@ -38,3 +38,5 @@ debug-static-mac64: release-static-win64: mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && $(MAKE) +release-win64: + mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=OFF -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && $(MAKE)