Cinder is a graphics library which acts similar to a wrapper for OpenGL
and C++
.
Creating a basic application using the library's CINDER_APP
function on macOS and compiling with XCode works as expected: Pressing keys does nothing, as the application is not set up to handle keyboard input.
Using identical code and compiling with CMake gives a different result:: Key presses are passed through by the window, being handled by whatever application was last opened. This occurs even if the test application is set up to handle keyboard input. This makes it impossible to actually handle keyboard input in a window when compiling with CMake as keyboard inputs are passed through entirely as if the window does not exist.
To clarify, these two test applications are, in every visible way, identical: They use the same .a
file of the library and the code is identical. Necessary OS X Frameworks have been included in the CMakeLists.txt
file.
What could be the cause of this issue? Some missing compiler flag in the CMakeLists.txt
file? Some improper configuration of CMake
? A slightly different standard library? The code clearly works, as evidenced by XCode
, however there must be some way to compile it in CMake
as well.