Skip to content

CMake function wrapper for djinni #10

Description

@jothepro

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestideaAn idea that needs further discussion/refinement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions