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?

  • 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


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

vala_precompile(VALA_C ${EXEC_NAME}
#     ../vapi/libgtop-2.0.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.