I’m a beginner struggling to figure out how to integrate Rive into my JUCE8 project. Does anyone know if this is even possible?
I have managed to build a prototype of using the JUCE framework of the back end, but i wanted to skin the plugin using Rive.
Most of my setup has worked so far, all the OpenGL and PluginProcessor parts have been coded etc (using AI)
The most persistent issue seems to be my CMAKELIST isn’t including my Source folder *.cpp and *.h files in the solution.
I am building it in Visual Studio 2022 using Clang-CL after using CMAKE to build with the CMAKELISTS method etc not using the PROJUCER tool.
I was able to get around the linker errors by adding the source files manually in the Visual Studio Solution Explorer after creating the solution file.
Does anyone know of an open-source project that I can take a look at that has Rive integrated into it?
Or examples of really well done GUI / UI’s that I can learn from.
I have a visual design background so that is why im trying hard to make the UI aspect stand out.
Thanks for the suggestion and you’re right – this was my first commit though ive been working on this for weeks now
This is the git repo:
After I CMAKE the project and create the VS solution, I have to then manually add the DemoTape/Sources folder *.cpp / *.h files to enable a compile via VS.
There are other errors that im working through here one by one as this does effectively work around the linker errors (not finding the pluginprocessor.cpp etc).
CMAKE just doesnt include those source files and its slightly annoying manually adding them everytime (seems strange?)
My concern is if it will affect the rest of the build somehow and im not wasting time debugging when the problem may have been that CMAKE linker errors..
Removed redundant preprocessor definitions (some were defined twice)
Simplified source file paths by making them relative to CMAKE_CURRENT_SOURCE_DIR
Added target_sources which is the proper way to add source files to a JUCE plugin target
Moved MSVC-specific definitions to appropriate sections
Removed commented-out code that’s not needed
Consolidated platform-specific settings
Improved organization and readability
Removed unnecessary generator expressions where simple if(MSVC) suffices
Removed redundant diagnostic check for RIVE_CPP_INCLUDE_DIR
Fixed source_group to use the variables instead of repeating file lists
Potential remaining considerations:
The absolute path to rive.lib might need to be configurable or have a debug/release variant
You might want to add checks for the existence of the Rive library path
Consider adding install rules if needed
You might want to add configuration-specific library paths for Debug/Release builds
The CMakeLists.txt should now build correctly assuming all the referenced files and paths exist on your system. Make sure to adjust the RIVE_CPP_LIB_PATH if it’s different on your build machine or if you need different paths for different configurations.
If this CMakeLists.txt works out, the next thing to do would be to get rive.lib through some better mechanism, as a build target perhaps. But, that’s over to you to work out (and don’t forget to share the details, because RIVE looks pretty good).. Disclaimer: I haven’t done anything in RIVE yet, I just like helping folks with easy JUCE stuff …
Okay, seems to build okay but I don’t yet have a “.riv” file to test with, maybe you want to contribute one and we can look at what it takes to wire things up vis a vis RIVE/JUCE .. If you’re interested, search for TODO: in my sample project, these are the entry points for RIVE and JUCE, and the real meat of the work is still yet to be done .. however, the project setup of JUCE and RIVE, integrated, seems to compile fine for now .. ymmv .. but the meat of the work is left up to you ..
Its super, super exciting if this is even possible and it would open up a lot of creative UI abilities. Combined with JUCE would be spectactular way of building plugins.
I’d love to see what it requires to hook it up too though im a mega noob – its but i’m very dedicated in learning to do it.
I’ve started already integrating the Rive renderer on top of the JUCE 7 ISC modules but it’s a separate project. It can already target all major desktop, mobile and web, but of course is still under heavy development and might lack the level of complexity of something like juce. But i’m looking for contributors (also someone with UI experience would be great), as it’s a fully open source initiative with no intention to close it down, and we can only keep making it better.
I saw this and it inspired me to try and work with it.
I’m a complete beginner with plugin coding/C++ but I love that you had the foresight to see Rive being extremely powerful to combine with JUCE. I’m also just diving into the Rive workflow but I have a lot of experience with UI.
If I end up using your open source library, I will suerly contribute in my own way and share!