I'm trying to build Ogre-Next-Deps, and I first tried it using the CMake GUI, version 3.23.2, on macOS 12.4. I select the source and build directories, click Configure, choose Xcode as the generator, and there are immediate errors:
The C compiler identification is unknown
The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_C_COMPILER could be found.
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_CXX_COMPILER could be found.
So then I tried going the command line route. This time, cmake succeeds, but make fails:
Thanks! My selected version of Xcode was a beta of Xcode 14. With that, cmake -G Xcode .. again gave an error about being unable to find a compiler. When I switched to Xcode 13.4.1, the error went away, and OGREDEPS.xcodeproj was generated.
When I went to do an ALL_BUILD of the dependencies, using Xcode 13.4.1, it all worked except for SDL2. The SDL2-configure shell script phase fails, with messages including:
Showing All Messages
-- Check for working CXX compiler: /Applications/Xcode13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - broken
CMake Error at /usr/local/Cellar/cmake/3.23.2/share/cmake/Modules/CMakeTestCXXCompiler.cmake:62 (message):
The C++ compiler
"/Applications/Xcode13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /Volumes/Work/git-repos/ogre-next-deps/build/src/SDL2-prefix/src/SDL2-build/CMakeFiles/CMakeTmp
Run Build Command(s):/Applications/Xcode13.4.1.app/Contents/Developer/usr/bin/xcodebuild -project CMAKE_TRY_COMPILE.xcodeproj build -target cmTC_50821 -parallelizeTargets -configuration Debug -hideShellScriptEnvironment && 2022-06-24 16:04:19.292 xcodebuild[20871:18164994] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-06-24 16:04:19.293 xcodebuild[20871:18164994] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
Command line invocation:
/Applications/Xcode13.4.1.app/Contents/Developer/usr/bin/xcodebuild -project CMAKE_TRY_COMPILE.xcodeproj build -target cmTC_50821 -parallelizeTargets -configuration Debug -hideShellScriptEnvironment
User defaults from command line:
HideShellScriptEnvironment = YES
IDEPackageSupportUseBuiltinSCM = YES
Build settings from command line:
TOOLCHAINS = com.apple.dt.toolchain.XcodeDefault
Thanks! My selected version of Xcode was a beta of Xcode 14. With that, cmake -G Xcode .. again gave an error about being unable to find a compiler. When I switched to Xcode 13.4.1, the error went away, and OGREDEPS.xcodeproj was generated.
Ahh, you just had a too recent XCode version. So CMake doesn't know to look for it.
When I went to do an ALL_BUILD of the dependencies, using Xcode 13.4.1, it all worked except for SDL2. The SDL2-configure shell script phase fails, with messages including:
Mmmm that's possible. Maybe you just need to clear the build folder if it already had garbage from back then with XCode 14.
Otherwise disable SDL2 build and use brew to install SDL2 (that was what we were doing until literally a few days ago; getting SDL2 to build with CMake in macOS is a major PITA)