As a CMake user I would like to call djinni by simply calling a CMake function that I imported from djinni. The call should look something like this:
# calls djinni on given IDL.
# calls `message(FATAL_ERROR ...)` and aborts configuration when something goes wrong during generation
djinni(path/to/idl.djinni
JAVA_OUT ${JAVA_OUTPUT_FOLDER} # expose all djinni options as cmake function parameters
JAVA_PACKAGE com.example.jnigenpackage
IDENT_JAVA_FIELD mFooBar
CPP_OUT ${CPP_OUTPUT_FOLDER}
# ... more djinni arguments
)
This makes my CMake code cleaner and more readable because I don't have to call djinni myself with execute_process and I don't need to implement error handling (what to do in case djinni generation fails?) myself.
As a CMake user I would like to call djinni by simply calling a CMake function that I imported from djinni. The call should look something like this:
This makes my CMake code cleaner and more readable because I don't have to call djinni myself with
execute_processand I don't need to implement error handling (what to do in case djinni generation fails?) myself.