Re: GtkDoc error in cmake



Hi Hiba

Firstly, the meaning of "target_include_dirs-NOTFOUND" is that CMake
tried to read a target property into the variable
'target_include_dirs', but the property was missing. So CMake set the
'target_include_dirs' variable to the string
"target_include_dirs-NOTFOUND". Same has happened with the
"target_link_libraries-NOTFOUND" error -- it means CMake tried to read
a property into the 'target_link_libraries' variable, but the property
wasn't set.

Where this actually happens is here:
https://git.gnome.org/browse/gtk-doc/tree/cmake/GtkDocConfig.cmake.in?id=64d940b45474c4e98c4ed9bb035248a40145527d#n319

and here:
https://git.gnome.org/browse/gtk-doc/tree/cmake/GtkDocConfig.cmake.in?id=64d940b45474c4e98c4ed9bb035248a40145527d#n336

It could well be that the code is just broken if the library for your
project doesn't link against any other libraries. I'll look into that.
However, looking at libraqm it seems to link against 3 libs (Freetype,
Harfbuzz and Fribidi).

Are you calling target_link_libraries() and target_include_dirs() at
all for the library you're documenting? If not, that explains why this
problem is occuring, but I think that things will break further down
because the gtkdoc-scanobj tool needs to actually compile and run a
program linked against your library, and so it needs to know all of
the dependencies.

If you can share your current CMakelists files for the library I can
try and reproduce the issue myself. I don't think the
GtkDocConfig.cmake module is widely used yet so it's quite likely that
you've found some kind of bug.

Sam

On 6/29/16, Hiba Alfarsi <hiba alfarsi 92 gmail com> wrote:
Hello ... I am working in project called "Libraqm"
https://github.com/HOST-Oman/libraqm .. and I want to use GtkDoc packege
for documentation..  I used this codes in CMakeLists.txt that is located in
doc directory:
#find_package (GtkDoc REQUIRED)
#gtk_doc_add_module(
#      libraqm
#      SOURCE ${CMAKE_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}
#      XML ${CMAKE_SOURCE_DIR}/docs/raqm-docs.xml
#      LIBRARIES raqm
#)

#add_custom_target (doc ALL)



and it seems there is an error:
CFLAGS:  "-Itarget_include_dirs-NOTFOUND" "-I/usr/include/glib-2.0"
"-I/usr/lib/x86_64-linux-gnu/glib-2.0/include"
/usr/bin/ld: cannot find -ltarget_link_libraries-NOTFOUND


My question is.. how i can solve this problem and what
"-Itarget_include_dirs" means ?!!!



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]