Skip to content

Commit

Permalink
Merge pull request #80 from anaselli/pkgconfig
Browse files Browse the repository at this point in the history
Pkgconfig
  • Loading branch information
shundhammer authored Jul 17, 2021
2 parents ac3256a + a6bf486 commit 39b72a9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VERSION.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SET( VERSION_MAJOR "2" )
SET( VERSION_MINOR "52" )
SET( VERSION_PATCH "0" )
SET( VERSION_PATCH "1" )
SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SHA1}" )

4 changes: 4 additions & 0 deletions package/libyui-gtk.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
-------------------------------------------------------------------
Sun Jul 11 15:27:20 CET 2021 - [email protected]
- Fixed CMAKE_INSTALL_LIBDIR for pkgconfig

-------------------------------------------------------------------
Sun Jan 31 18:24:20 CET 2021 - [email protected]

Expand Down
4 changes: 2 additions & 2 deletions package/libyui-gtk.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@


Name: libyui-gtk
Version: 2.51.0
Version: 2.52.1
Release: 0
Source: %{name}-%{version}.tar.bz2

%define so_version 14
%define so_version 15
%define bin_name %{name}%{so_version}

BuildRequires: boost-devel
Expand Down
11 changes: 10 additions & 1 deletion pkgconfig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,16 @@ SET( SONAME_MAJOR ${YUI_SO_MAJOR} )
SET( SONAME_MINOR ${YUI_SO_MINOR} )
SET( SONAME_PATCH ${YUI_SO_PATCH} )

set( PKGCONFIG_INSTALL_DIR ${DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig )
# See https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
# CMAKE_INSTALL_FULL_<dir>
# The absolute path generated from the corresponding CMAKE_INSTALL_<dir> value.
# If the value is not already an absolute path, an absolute path is constructed
# typically by prepending the value of the CMAKE_INSTALL_PREFIX variable.
# So that covers also cmake directive -DCMAKE_INSTALL_LIBDIR=/usr/lib64 with full
# pathname.
# CMAKE_INSTALL_FULL_LIBDIR is used to install libyui-gtk.pc and inside it
# to set "libdir" and "plugindir" pkg-config variables
set( PKGCONFIG_INSTALL_DIR ${DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig )

# Generate libyui-gtk.pc where some CMake variables are expanded from libyui-gtk.pc.in,
# but only expand @VARIABLE@, not ${VARIABLE}
Expand Down
4 changes: 2 additions & 2 deletions pkgconfig/libyui-gtk.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ exec_prefix=${prefix}

datarootdir=${exec_prefix}/share
datadir=${datarootdir}/libyui
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=${exec_prefix}/include
plugindir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@/yui
plugindir=@CMAKE_INSTALL_FULL_LIBDIR@/yui

soversion_major=@SONAME_MAJOR@
soversion_minor=@SONAME_MINOR@
Expand Down

0 comments on commit 39b72a9

Please sign in to comment.