[CMake Noob build error] Building a new CMake Juce project with tracktion engine's modules

Hi everyone, I’m new here and this is my first contribution to the forum :slight_smile:

So, I’ve been learning C++ at my CS school and I have a project idea that I want to make with tracktion engine (which looks absolutely fantastic).

I use CLion and CMake for all my projects but their architecture are always very simple since I only use the STL most of the time.
To get started, I cloned Eyal Amir’s very cool juce CMake project prototype and copied tracktion engine’s tracktion_engine and tracktion_graph modules directories into my proto’s Modules folder and juce_add_module()'d them to my App’s CMakeLists.

All of this seemed to work from what I’ve witnessed, but I get errors when building the tracktion_graph’s tracktion_graph_tests_Utilities.h file (pastebin)
Sorry for the french output, couldn’t find a way to change my CMake output language…

From what I understand, I may have missed a step when copying tracktion modules into my project, but after two days of struggle I decided to seek for some help.

Any ideas would be greatly appreciated, I can provide additional info if needed.
Thank you very much !

PS : Would be very neat to have a quick JUCE+tracktion+CMake doc, just to have a rough idea of the steps involved for a “hello, world” project ! :smiley:

Are you on the tracktion_graph branch?
If so, there are Cmake examples in the /examples dir here: tracktion_engine/examples at tracktion_graph · Tracktion/tracktion_engine · GitHub

E.g. to build the PatternGenerator example:

Does that help?

1 Like

After a bit of research I found that I was missing Julian Storer’s CHOC, cloning the repo into both module’s 3rd_party folder and removing all ../ for CHOC include paths in problematic headers solved it.

I then had some missing includes for LockFreeMultiThreadedNodePlayer and ThreadPoolStrategy, fixed them with CLion quick-fix feature, and am now running into a strange one :

tracktion_graph_LockFreeMultiThreadedNodePlayer.cpp
[REPO] \Modules\tracktion_graph\tracktion_graph\tracktion_graph_LockFreeMultiThreadedNodePlayer.h(132): error C2039: 'function' n'est pas membre de 'std'

I did add set(CMAKE_CXX_STANDARD 17) in my CMakeLists, that’s strange… will dig into that some more, but I have a feeling I’m not quite on the right path solving these one by one, like if these were a symptom of a bad file architecture or another obvious step that I missed at some point :confused:

Ok, deleting some mess, I got confused. :slight_smile:
Building the example after a reclone works first try. Thank you very much Dave !

Glad it’s working now.