Skip to content

Commit 9d5c1ba

Browse files
watologo1Thomas Renninger
authored and
Thomas Renninger
committed
Add configure_file and pkg-config template
This will generate a libredfish.pc file that can/should be placed to (in openSUSE at least): /usr/lib64/pkgconfig So that Linux systems making use of pkg-config are aware of libredfish library
1 parent 4b26a81 commit 9d5c1ba

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,5 @@ elseif(MSVC)
128128
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LIBPATH:.. /LIBPATH:../curl/lib")
129129
endif()
130130
endif()
131+
132+
configure_file(libredfish.pc.in libredfish.pc @ONLY)

libredfish.pc.in

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# this template is filled-in by CMake `configure_file(... @ONLY)`
2+
# the `@....@` are filled in by CMake configure_file(),
3+
# from variables set in your CMakeLists.txt or by CMake itself
4+
#
5+
# Good tutoral for understanding .pc files:
6+
# https://people.freedesktop.org/~dbn/pkg-config-guide.html
7+
8+
prefix="@CMAKE_INSTALL_PREFIX@"
9+
exec_prefix="@CMAKE_INSTALL_BINDIR@
10+
libdir="@CMAKE_INSTALL_LIBDIR@"
11+
includedir="@INCLUDE_INSTALL_DIR@"
12+
13+
Name: @PROJECT_NAME@
14+
Description: Redfish library
15+
URL: https://github.com/DMTF/libredfish
16+
Version: @LIBREDFISH_VERSION_STRING@
17+
Requires: @pc_req_public@
18+
Cflags: -I"${includedir}"
19+
Libs: -L"${libdir}" -lredfish

0 commit comments

Comments
 (0)