From c72376856260360074879a5c91217c66c934558d Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 23 Oct 2021 03:00:53 +0200 Subject: Re-introduce (CMake based) build support against GTK+ 2.0. --- docs/reference/CMakeLists.txt | 9 ++++++++- docs/reference/scangobj.sh.in | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'docs/reference') diff --git a/docs/reference/CMakeLists.txt b/docs/reference/CMakeLists.txt index 6ae064a..487d9a1 100644 --- a/docs/reference/CMakeLists.txt +++ b/docs/reference/CMakeLists.txt @@ -1,3 +1,8 @@ +if (FLAVOUR_GTK3) + set (ayatana_appindicator_gtkver "ayatana-appindicator3") +elseif (FLAVOUR_GTK2) + set (ayatana_appindicator_gtkver "ayatana-appindicator") +endif() # libayatana-appindicator-docs.sgml @@ -50,6 +55,8 @@ add_custom_command( list(JOIN PROJECT_DEPS_INCLUDE_DIRS " -I" GTKDOC_SCANGOBJ_INCLUDE_DIRS) list(JOIN PROJECT_DEPS_LIBRARIES " -l" GTKDOC_SCANGOBJ_LIBRARIES) +set (SCANGOBJ_AYATANA_APPINDICATOR "${ayatana_appindicator_gtkver}") + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scangobj.sh.in" "${CMAKE_CURRENT_BINARY_DIR}/scangobj.sh") # libayatana-appindicator.actions @@ -228,6 +235,6 @@ add_custom_command( ) set_source_files_properties("fixxref" PROPERTIES SYMBOLIC True) -install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/gtk-doc/html/libayatana-appindicator") +install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/gtk-doc/html/lib${ayatana_appindicator_gtkver}") add_custom_target("docs-references" ALL DEPENDS "fixxref") diff --git a/docs/reference/scangobj.sh.in b/docs/reference/scangobj.sh.in index 0272865..8cb2500 100644 --- a/docs/reference/scangobj.sh.in +++ b/docs/reference/scangobj.sh.in @@ -1 +1 @@ -LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${CMAKE_BINARY_DIR}/src" CFLAGS="-I${GTKDOC_SCANGOBJ_INCLUDE_DIRS}" LDFLAGS="-l${GTKDOC_SCANGOBJ_LIBRARIES} -L${CMAKE_BINARY_DIR}/src -layatana-appindicator3" gtkdoc-scangobj --type-init-func="g_type_init()" --module=libayatana-appindicator > /dev/null +LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${CMAKE_BINARY_DIR}/src" CFLAGS="-I${GTKDOC_SCANGOBJ_INCLUDE_DIRS}" LDFLAGS="-l${GTKDOC_SCANGOBJ_LIBRARIES} -L${CMAKE_BINARY_DIR}/src -l${SCANGOBJ_AYATANA_APPINDICATOR}" gtkdoc-scangobj --type-init-func="g_type_init()" --module=libayatana-appindicator > /dev/null -- cgit v1.2.3