Open nighthawk469 opened 3 years ago
Sorry for the delay, have been AFK. I steer away from Xcode as it gives me a headache, but had a brief look and you're right..
The CMake script assumes the binary would be within the root bin folder and copies the resources folder to there, however (presumably) Xcode is building to bin/Debug ( bin/{Environment} ) etc.
CMakeLists.txt..
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
Manually copying the resources to the real bin folder would work, in the short term.
Ideally the CMake script should handle it. Did you manage to update it at your end?
Ok cool. I did not get it working, but I might try your short term solution. If I make any progress I'll report back.
This project builds and runs fine when I use cmake to build a makefile. When I try to run with a generated Xcode project it generates a problem. I get a Thread "EXC_BAD_ACCESS" when trying to use the OpenSans-Regular.ttf font. It looks like it might not be able to find the resources directory.
I saw this cmake page about specifying MacOS resource files in a FRAMEWORK or BUNDLE and it looks related. https://cmake.org/cmake/help/latest/prop_tgt/RESOURCE.html