Skip to content

Commit

Permalink
libical-glib: Make the vapigen depend also on the .typelib file
Browse files Browse the repository at this point in the history
The .typelib file is needed when building vala bindings from the introspection
data, but as it was not depending on it, the vapigen could, in some cases, run
before the .typelib file was created. This ensures to wait for it.
  • Loading branch information
mcrha committed Nov 6, 2024
1 parent 55aae0c commit fb19c0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libical-glib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ endif()
if(ICAL_GLIB_VAPI)
add_custom_target(vala ALL COMMENT "Target to run vala")
set(gir_fullname ${PROJECT_BINARY_DIR}/src/libical-glib/ICalGLib-${LIBICAL_GLIB_GIR_VERSION_STRING}.gir)
set(typelib_fullname ${PROJECT_BINARY_DIR}/src/libical-glib/ICalGLib-${LIBICAL_GLIB_GIR_VERSION_STRING}.typelib)
set(metadata_fullname ${CMAKE_CURRENT_BINARY_DIR}/ICalGLib-${LIBICAL_GLIB_GIR_VERSION_STRING}.metadata)
set(vapi_file ${CMAKE_CURRENT_BINARY_DIR}/libical-glib.vapi)

Expand All @@ -240,7 +241,7 @@ if(ICAL_GLIB_VAPI)
${VAPIGEN} --vapidir=${CMAKE_CURRENT_SOURCE_DIR} --vapidir=${CMAKE_CURRENT_BINARY_DIR}
--girdir=${PROJECT_BINARY_DIR}/src/libical-glib --pkg gio-2.0 --library libical-glib
--metadatadir=${CMAKE_CURRENT_SOURCE_DIR} --metadatadir=${CMAKE_CURRENT_BINARY_DIR} ${gir_fullname}
DEPENDS ${gir_fullname} ${metadata_fullname}
DEPENDS ${gir_fullname} ${typelib_fullname} ${metadata_fullname}
COMMENT "Run the tool to generate the Vala API"
)

Expand Down

0 comments on commit fb19c0f

Please sign in to comment.