1
0
Fork 0
forked from lthn/blockchain

Update build presets and CPack config for Windows

Set PRESET_CONFIGURE to 'conan-default' for Windows builds in Makefile and GitHub workflow. Broaden CPack packaging conditions to include additional build types and comment out WIX generator settings for Windows in CPackConfig.cmake.
This commit is contained in:
Snider 2025-10-08 23:28:09 +01:00
parent 5d9d6f9282
commit 20ceda91e5
3 changed files with 7 additions and 10 deletions

View file

@ -70,7 +70,7 @@ jobs:
- run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]"
- name: Compile Release
run: make release PRESET_CONFIGURE=conan-default CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
- name: CLI Artifacts
uses: ./.github/actions/upload-artifacts

View file

@ -19,9 +19,6 @@ BUILD_FOLDER:=build/release
PRESET_BUILD:=conan-release
PRESET_CONFIGURE:=conan-release
# -----------------------------------------------------------------
# Unixlike systems (Linux, macOS, *BSD, etc.)
# -----------------------------------------------------------------
UNAME_S := $(shell uname -s 2>/dev/null || echo Unknown)
ifeq ($(UNAME_S),Linux)
@ -40,10 +37,10 @@ ifeq ($(filter %BSD,$(UNAME_S)),%BSD)
CPU_CORES := $(shell sysctl -n hw.ncpu 2>/dev/null || echo 1)
endif
# -----------------------------------------------------------------
# Windows (detected by the builtin $(OS) variable set by GNU make)
# -----------------------------------------------------------------
ifeq ($(OS),Windows_NT)
PRESET_CONFIGURE:=conan-default
# Prefer the environment variable that Windows sets for us.
# It works in both cmd.exe and PowerShell.
CPU_CORES := $(NUMBER_OF_PROCESSORS)

View file

@ -1,6 +1,6 @@
if(CMAKE_BUILD_TYPE STREQUAL "Release")
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel" OR CMAKE_BUILD_TYPE STREQUAL "")
set(CPACK_PACKAGE_NAME "${package_name}")
set(CPACK_PACKAGE_VENDOR "${package_vendor}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${package_description}")
@ -26,8 +26,8 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release")
# message(STATUS "Registered CPACK_GENERATOR: productbuild")
endif ()
elseif(WIN32)
# set(CPACK_GENERATOR "WIX")
# message(STATUS "Registered CPACK_GENERATOR: WIX")
# set(CPACK_GENERATOR "WIX")
# message(STATUS "Registered CPACK_GENERATOR: WIX")
# set(CPACK_WIX_PRODUCT_ICON "${CMAKE_SOURCE_DIR}/resources/windows_icon.ico")
# set(CPACK_WIX_LICENSE_RTF "${CMAKE_SOURCE_DIR}/LICENSE.rtf")
# set(CPACK_WIX_UPGRADE_GUID "D3F5A9C1-4B2E-4F5A-9C71-123456789ABC") # change once per major version