bring back MSYS2 packaging (#994)

* add package step to workflow
This commit is contained in:
Roman Fomin 2023-04-17 22:39:46 +07:00 committed by GitHub
parent 13d0eea2a4
commit 654ddf6200
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 8 deletions

View File

@ -89,3 +89,8 @@ jobs:
- name: Build
run: cmake --build build
- name: Package
run: |
cd build
cpack -G ZIP

View File

@ -36,13 +36,6 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(FATAL_ERROR "In-tree builds are not supported.")
endif()
execute_process(COMMAND uname OUTPUT_VARIABLE uname)
if (NOT MSVC AND (uname MATCHES "^MSYS" OR uname MATCHES "^MINGW"))
set(MSYS ON)
else()
set(MSYS OFF)
endif()
# Hardcoded defines added to configure and resource files.
set(PROJECT_COMPANY "Fabian Greffrath and contributors")
set(PROJECT_COPYRIGHT "Copyright (C) 1993-2023")

View File

@ -269,7 +269,16 @@ endif()
# Files to package in our distribution.
if(WIN32)
install(TARGETS woof woof-exe woof-setup RUNTIME DESTINATION .)
if(CMAKE_VERSION VERSION_GREATER 3.20 AND NOT VCPKG_TOOLCHAIN)
install(TARGETS woof woof-exe woof-setup
RUNTIME_DEPENDENCIES
PRE_EXCLUDE_REGEXES "api-ms-" "ext-ms-"
POST_EXCLUDE_REGEXES ".*system32/.*\\.dll"
DIRECTORIES $<TARGET_FILE_DIR:woof> $ENV{PATH}
RUNTIME DESTINATION .)
else()
install(TARGETS woof woof-exe woof-setup RUNTIME DESTINATION .)
endif()
install(FILES "$<TARGET_FILE_DIR:woof-com>/woof.com" DESTINATION .)
else()
install(TARGETS woof woof-setup RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})