Skip to content

Commit f0071f1

Browse files
committed
Patch cmake configuration instead of installing binaries manually
1 parent 384ac37 commit f0071f1

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index ecfbb83..29c45b9 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -260,12 +260,10 @@ generate_pkg_config ("${CMAKE_CURRENT_BINARY_DIR}/libwoff2enc.pc"
6+
LIBRARIES woff2enc)
7+
8+
# Installation
9+
-if (NOT BUILD_SHARED_LIBS)
10+
- install(
11+
- TARGETS woff2_decompress woff2_compress woff2_info
12+
- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
13+
- )
14+
-endif()
15+
+install(
16+
+ TARGETS woff2_decompress woff2_compress woff2_info
17+
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
18+
+)
19+
20+
install(
21+
TARGETS woff2common woff2dec woff2enc

recipes/woff2/recipe.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ source:
1111
sha256: add272bb09e6384a4833ffca4896350fdb16e0ca22df68c0384773c67a175594
1212
patches:
1313
- patches/001-include-cstdint.patch
14+
- patches/002-install-binaries.patch
1415

1516
build:
1617
number: 0
@@ -19,11 +20,6 @@ build:
1920
- cmake ${CMAKE_ARGS} -S . -B build -GNinja
2021
- cmake --build build
2122
- cmake --install build
22-
# Manually install binaries not handled by cmake --install
23-
- mkdir -p "${{ PREFIX }}/bin"
24-
- install -m755 build/woff2_info "${{ PREFIX }}/bin/woff2_info"
25-
- install -m755 build/woff2_decompress "${{ PREFIX }}/bin/woff2_decompress"
26-
- install -m755 build/woff2_compress "${{ PREFIX }}/bin/woff2_compress"
2723
requirements:
2824
build:
2925
- ${{ compiler('c') }}

0 commit comments

Comments
 (0)