Skip to content

Commit 89b0ab8

Browse files
author
Harry Kunz
committed
build: generate sjpeg.pc pkg-config file for sjpeg
1 parent 46da5ae commit 89b0ab8

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,15 @@ install(
229229
DESTINATION ${ConfigPackageLocation}
230230
)
231231

232+
# Generate pkg-config file
233+
configure_file(
234+
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/sjpeg.pc.in"
235+
"${CMAKE_CURRENT_BINARY_DIR}/sjpeg.pc"
236+
@ONLY
237+
)
238+
239+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sjpeg.pc"
240+
DESTINATION lib/pkgconfig)
232241

233242
################################################################################
234243
# Man page.

cmake/sjpeg.pc.in

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
prefix=@CMAKE_INSTALL_PREFIX@
2+
exec_prefix=${prefix}
3+
libdir=${exec_prefix}/lib
4+
includedir=${exec_prefix}/include
5+
6+
Name: sjpeg
7+
Description: Lightweight JPEG encoder with simple C API and optional C++ interface
8+
Version: @PROJECT_VERSION@
9+
10+
Requires: libjpeg libpng
11+
Requires.private:
12+
13+
Libs: -L${libdir} -lsjpeg -ljpeg -lpng
14+
Libs.private:
15+
16+
Cflags: -I${includedir}
17+
Cflags.private:

0 commit comments

Comments
 (0)