sudara / melatonin_inspector

A JUCE module that gives you the ability to inspect and visually edit (non-destructively) components in your UI.
MIT License
145 stars 17 forks source link

Move all module files into a separate module folder #78

Closed chrhaase closed 7 months ago

chrhaase commented 1 year ago

Out of curiosity would you want to do that, you think? I usually make the assumption people are sticking things in modules/exact_module_name but I've noticed other people publishing modules can be looser about naming conventions too...

_Originally posted by @sudara in https://github.com/sudara/melatonin_inspector/issues/60#issuecomment-1688142281_

I would suggest something like this! Actually, I couldn't get it to compile in the original version, as CMake went into an infinite loop going:

[0/2] Re-checking globbed directories...
-- GLOB mismatch!
[1/2] Re-running CMake...
-- Cloning JUCE...
-- Configuring juceaide
-- Building juceaide
-- Exporting juceaide
-- Configuring done (2.2s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/_c_h_r_i_l_l_e_/devel/JUCING/melatonin_inspector/cmake-build-debug
[0/2] Re-checking globbed directories...
-- GLOB mismatch!
[1/2] Re-running CMake...

Never seen that before.. :) may be it's something with the juce_add_module function internally globbing files in the module directory, which in this case was the top directory including the build folders. Have you not run into this? I'm on mac and using CLion.

sudara commented 1 year ago

Oh awesome, actually I wanted to follow up with you about this so I could understand how it helps you to have that folder renamed.

Basically: do you stick modules in a modules folder? Is there a reason you like to rename them? Just looking to understand, as my preference is that everything is named in line with the github repo, makes working by convention much easier.

And yes, I just recentely added support for a top level compile in CMake. It's happy on GitHub and on the command line, but CLion seems to hate it...

sudara commented 1 year ago

Ah, and sorry in that comment I think there was some confusion!

I didn't mean "would you want to do the work/open a PR" but "would you even want that?"

Your reply about the weekend totally confused me, sorry I was unclear!! 🤣

chrhaase commented 1 year ago

I didn't mean "would you want to do the work/open a PR" but "would you even want that?"

Ah, no problem, it was a very quick change :)

Basically: do you stick modules in a modules folder? Is there a reason you like to rename them? Just looking to understand, as my preference is that everything is named in line with the github repo, makes working by convention much easier.

Yes, if I have submodules I usually have them in a libs dir and just with their original names, so it wouldn't be a problem if I had gone that way. I'm not sure how common it is for people to make their own names for submodules actually. :)

sudara commented 1 year ago

Yes, if I have submodules I usually have them in a libs dir and just with their original names

Ok awesome, thanks!

I will try to make CMake/CLion 100% happy without folder nesting, and then fallback to this if it's impossible.

sudara commented 7 months ago

I'm going to close this for now. It was discussed with the JUCE team here: https://forum.juce.com/t/infinite-loop-calling-juce-add-module-from-a-cmakelists-txt-in-the-modules-own-directory/58783/15?u=sudara

Essentially, they don't support building a module in the root folder of a module! It only seems to cause a problem when building the module alone on CLion+Ninja.