How to build the JUCE source code with CMake

Hello,

I want to create a JUCE package for the package manager conan.io in order to be able to use it as dependency in other projects. How can I build the whole juce modules source code (JUCE/modules at master · juce-framework/JUCE · GitHub) with CMake?

I tried many things, but I get a lot of errors (seems like it ignores the header files completely). Unfortunately, my C++ and CMake skills are still quite low. The project is located here: GitHub - spotlesscoder/juce-conan: conan.io package for JUCE framework
Can anyone please help me?

Thanks in advance.

You may want to look into this: JUCE conan package