Closed luisldq closed 7 months ago
Hi there!
set(CMAKE_C_COMPILER "/usr/bin/clang")
set(CMAKE_CXX_COMPILER "/usr/bin/clang++")
What's the reasoning for doing this? It makes the project non-portable (best to supply these as arguments to cmake
on the command line when necessary). On apple platforms, CMake should do the right thing without these arguments.
For example, to generate an Xcode project, you'd could do the following:
# configure into a directory called cmake-build
cmake --build cmake-build
# build and generate an Xcode project
cmake . -B cmake-build -GXcode
or if you are using Clion, you can just open the folder up and it'll all just work...
@sudara thanks for your response :-) I added those to try and see if it would help. Same result without. I am using CLion :-(
To be clear, I am trying the CLion Build command, for the Standalone target.
/Applications/CMake.app/Contents/bin/cmake --build /Users/ldq/Audialab/thiccc-pamplejuce2/cmake-build-debug --target MyPlugin_Standalone -j 8
It's a bit hard to "diff" what's going on in your version vs. vanilla pamplejuce, as there's a lot of changes.
Stuff like this is going to make things quite unhappy:
include_directories(source/JuceLibraryCode)
as is
source/JuceLibraryCode/include_juce_gui_basics.cpp
You don't need any of that. You shouldn't be pulling in JUCE code manually. You just need add_subdirectory(JUCE)
.
This is also wrong, please check the current CMakeLists:
target_sources("${PROJECT_NAME}" PRIVATE ${SourceFiles})
I would recommend starting again with a clean version of Pamplejuce's CMakeLists.txt. Make sure it builds happy and then add things incrementally to figure out when they break.
Thank you! FYI I added -x objective-c++ to the build command on my command line and it worked.
I reverted to a stock PampleJUCE CMakeLists.txt and after rearranging some of my code which was generated by Projucer initially, I got it to work. Weird error above where -x objective-c++ was missing :-)
Closing as nonissue
Hello, thanks for the great template!
I'm able to compile and run it, but when I drag my Projucer code in and customize the CMakeLists.txt file, I get a compile error from clang++ choking on the Objective-C syntax found in the JUCE library. I'm sure I'm doing something wrong, any help is appreciated!
Error and full CMakeLists.txt file below: