RandyGaul / cute_framework

The *cutest* framework out there for creating 2D games in C++!
https://randygaul.github.io/cute_framework/#/
Other
534 stars 31 forks source link

Enable OBJC on Apple platforms #185

Closed pusewicz closed 2 months ago

pusewicz commented 2 months ago

This fixes this error:

-- Build files have been written to: /Users/piotr/Work/GitHub/cute_framework/build/_deps/spirv_cross-subbuild
[0/7] Performing update step for 'spirv_cross-populate'
-- Fetching latest from the remote origin
[1/7] No patch step for 'spirv_cross-populate'
[3/7] No configure step for 'spirv_cross-populate'
[4/7] No build step for 'spirv_cross-populate'
[5/7] No install step for 'spirv_cross-populate'
[6/7] No test step for 'spirv_cross-populate'
[7/7] Completed 'spirv_cross-populate'
-- SPIRV-Cross: Finding Git version for SPIRV-Cross.
-- SPIRV-Cross: Git hash: 66363ac
-- Configuring done (8.8s)
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_OBJC_COMPILE_OBJECT
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_OBJC_COMPILE_OBJECT
-- Generating done (0.1s)
CMake Generate step failed.  Build files cannot be regenerated correctly.
FAILED: build.ninja
/Applications/CMake.app/Contents/bin/cmake --regenerate-during-build -S/Users/piotr/Work/GitHub/cute_framework -B/Users/piotr/Work/GitHub/cute_framework/build
ninja: error: rebuilding 'build.ninja': subcommand failed
RandyGaul commented 2 months ago

Don’t think you should globally turn on obj-c, typically for cross platform projects specific files are named .m or .mm for obj-c and obj-c++

pusewicz commented 2 months ago

@RandyGaul I've updated the description to show what error I'm getting. Some people do suggest this fix: https://github.com/libsdl-org/SDL/issues/6454

RandyGaul commented 2 months ago

I see, looks like a bug in cmake. Ok we can turn it on for now.