Mostly, I switched things to use the CMake files that GTK-Doc installed on my system (Ubuntu 20.04), instead of what used to be bundled in the libinstpatch repo.
Important caveat: it doesn't quite work. When I build, I get this mess:
[ 1%] Generating libinstpatch.signals
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for modules 'glib-2.0;gobject-2.0'
-- Found glib-2.0, version 2.64.3
-- Found gobject-2.0, version 2.64.3
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_PREFIXES
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_SUFFIXES
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_PREFIXES
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_SUFFIXES
-- Executing gtkdoc-scangobj with:
-- CFLAGS: '-I/home/david/src/libinstpatch' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include'
-- LDFLAGS: '-L/home/david/src/libinstpatch/build/docs/reference/../../libinstpatch' '-linstpatch-1.0' '-lgobject-2.0' '-lglib-2.0'
-- LDPATH: /home/david/src/libinstpatch/build/docs/reference/../../libinstpatch
[ 94%] Built target libinstpatch
[ 96%] Built target riff_dump
libinstpatch-scan.c: In function ‘main’:
libinstpatch-scan.c:267:3: warning: implicit declaration of function ‘ipatch_init’ [-Wimplicit-function-declaration]
267 | ipatch_init();
| ^~~~~~~~~~~
-- Scan succeeded.
make[2]: *** [docs/reference/CMakeFiles/doc-libinstpatch.dir/build.make:109: docs/reference/libinstpatch.signals] Error 1
make[2]: *** Deleting file 'docs/reference/libinstpatch.signals'
make[1]: *** [CMakeFiles/Makefile2:292: docs/reference/CMakeFiles/doc-libinstpatch.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
There's a sequence of failures here:
In /usr/share/cmake/GtkDoc/GtkDocScanGObjWrapper.cmake, the call to pkg_check_modules emits those internal CMake variable not set errors. That might be a bug in either GTK-Doc or CMake.
The script keeps working OK, but it ends with an exit status of 1.
docs/reference/CMakeFiles/doc-libinstpatch.dir/build.make fails on line 109. make deletes docs/reference/libinstpatch.signals even though it was successfully created, so a second invocation of make gives the same error.
Mostly, I switched things to use the CMake files that GTK-Doc installed on my system (Ubuntu 20.04), instead of what used to be bundled in the libinstpatch repo.
Important caveat: it doesn't quite work. When I build, I get this mess:
There's a sequence of failures here:
/usr/share/cmake/GtkDoc/GtkDocScanGObjWrapper.cmake
, the call topkg_check_modules
emits thoseinternal CMake variable not set
errors. That might be a bug in either GTK-Doc or CMake.1
.docs/reference/CMakeFiles/doc-libinstpatch.dir/build.make
fails on line 109.make
deletesdocs/reference/libinstpatch.signals
even though it was successfully created, so a second invocation ofmake
gives the same error.make
fails.Workaround is to go to
build.make
, line 109 and stick a-
at the beginning of the line, like so:Also: I killed
gtk-doc.make
.