From bfb679de31ba276e0155153fc3efff9b8aacbbf6 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 12 May 2021 13:27:15 +0200 Subject: Bring back GTK+-2.0 and GTK+-3.0 build flavours. --- data/CMakeLists.txt | 26 ++++++++++++++++++++------ data/ayatana-indicator.pc.in | 15 +++++++++++++++ data/ayatana-indicator3-0.4.pc.in | 15 --------------- data/ayatana-indicator3.pc.in | 15 +++++++++++++++ 4 files changed, 50 insertions(+), 21 deletions(-) create mode 100644 data/ayatana-indicator.pc.in delete mode 100644 data/ayatana-indicator3-0.4.pc.in create mode 100644 data/ayatana-indicator3.pc.in (limited to 'data') diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index f6c71d9..8e10313 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,12 +1,26 @@ # ayatana-indicator3-0.4.pc -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicator3-0.4.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator3-0.4.pc" @ONLY) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator3-0.4.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig/") +if (FLAVOUR_GTK3) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicator3.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator3-0.${API_VERSION}.pc" @ONLY) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator3-0.${API_VERSION}.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig/") +else() + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicator.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-0.${API_VERSION}.pc" @ONLY) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-0.${API_VERSION}.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig/") +endif() + +# ayatana-indicators.target (only required once, so let's do it with FLAVOUR_GTK3) + +if (FLAVOUR_GTK3) -# ayatana-indicators.target + pkg_check_modules(SYSTEMD systemd) -pkg_check_modules(SYSTEMD systemd) + if (${SYSTEMD_FOUND}) + if (${SYSTEMD_VERSION} VERSION_LESS 247) + set(SYSTEMD_USER_UNIT_DIR ${CMAKE_INSTALL_PREFIX}/lib/systemd/user) + else() + pkg_get_variable(SYSTEMD_USER_UNIT_DIR systemd systemd_user_unit_dir) + endif() + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicators.target" DESTINATION "${SYSTEMD_USER_UNIT_DIR}") + endif() -if (${SYSTEMD_FOUND}) - install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicators.target" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/systemd/user") endif() diff --git a/data/ayatana-indicator.pc.in b/data/ayatana-indicator.pc.in new file mode 100644 index 0000000..e4f06a2 --- /dev/null +++ b/data/ayatana-indicator.pc.in @@ -0,0 +1,15 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ +bindir=${exec_prefix}/@CMAKE_INSTALL_BINDIR@ +includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ +indicatordir=${exec_prefix}/lib/ayatana-indicators/@ABI_VERSION@/ +iconsdir=${prefix}/@CMAKE_INSTALL_DATADIR@/@PROJECT_NAME@/icons/ + +Cflags: -I${includedir}/libayatana-indicator-0.@API_VERSION@ +Requires: gtk+-2.0 +Libs: -layatana-indicator + +Name: libayatana-indicator +Description: libayatana-indicator. +Version: @PROJECT_VERSION@ diff --git a/data/ayatana-indicator3-0.4.pc.in b/data/ayatana-indicator3-0.4.pc.in deleted file mode 100644 index 231fa71..0000000 --- a/data/ayatana-indicator3-0.4.pc.in +++ /dev/null @@ -1,15 +0,0 @@ -prefix=@CMAKE_INSTALL_PREFIX@ -exec_prefix=${prefix} -libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ -bindir=${exec_prefix}/@CMAKE_INSTALL_BINDIR@ -includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ -indicatordir=${exec_prefix}/lib/ayatana-indicators3/@ABI_VERSION@/ -iconsdir=${prefix}/@CMAKE_INSTALL_DATADIR@/@PROJECT_NAME@/icons/ - -Cflags: -I${includedir}/libayatana-indicator3-0.@API_VERSION@ -Requires: gtk+-3.0 -Libs: -layatana-indicator3 - -Name: libayatana-indicator3 -Description: libayatana-indicator3. -Version: @PROJECT_VERSION@ diff --git a/data/ayatana-indicator3.pc.in b/data/ayatana-indicator3.pc.in new file mode 100644 index 0000000..231fa71 --- /dev/null +++ b/data/ayatana-indicator3.pc.in @@ -0,0 +1,15 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ +bindir=${exec_prefix}/@CMAKE_INSTALL_BINDIR@ +includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ +indicatordir=${exec_prefix}/lib/ayatana-indicators3/@ABI_VERSION@/ +iconsdir=${prefix}/@CMAKE_INSTALL_DATADIR@/@PROJECT_NAME@/icons/ + +Cflags: -I${includedir}/libayatana-indicator3-0.@API_VERSION@ +Requires: gtk+-3.0 +Libs: -layatana-indicator3 + +Name: libayatana-indicator3 +Description: libayatana-indicator3. +Version: @PROJECT_VERSION@ -- cgit v1.2.3