-1

Added CUSTOM_VAPIS with vapi/libgtop-2.0.vapi to vala_precompile() in CmakeLists.txt and got this error: No rules for target '../src/vapi/libgtop-2.0.vapi' ...

How to add vapi files properly?

1
  • This is really a CMake question, not Vala, and Vala support isn't built into CMake, so you should link to the file you're using (there are several floating around).
    – nemequ
    Commented Aug 11, 2017 at 20:09

1 Answer 1

1

Instead of CUSTOM_VAPIS I had to use --vapidir option.

vala_precompile(VALA_C ${EXEC_NAME}
    ...
PACKAGES
    ...
# CUSTOM_VAPIS
#     ../vapi/libgtop-2.0.vapi
OPTIONS
    --vapidir=${CMAKE_SOURCE_DIR}/vapi/
    ...
)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.