Luca Lolli

Results 18 comments of Luca Lolli
trafficstars

I opened a PR that seems to fix this issue: https://github.com/libsdl-org/SDL/pull/6198

I am using cmake version 3.24.1, which should be quite updated

One note, if I generate a Ninja project, compilation works just fine with SDL 2.24.0 While with Xcode I have to add the above flag

Sure I can try to add enable_language(OBJC), in the sdl cmakelists? Because compilation fails on SDL-static, not on my project

So I tried to quickly replace `set_target_properties(SDL2-static PROPERTIES COMPILE_FLAGS "-x objective-c")` with your suggested macro `enable_language(OBJC)` But no luck :( Also I noticed that for cmake version 3.16+ `enable_language(OBJC)` is...

> ```cmake > foreach(src ${SOURCE_FILES}) > if(src MATCHES ".*\.m$") > set_property(SOURCE "${src}" APPEND_STRING COMPILE_FLAGS " -x objective-c") > endif() > endforeach() > ``` It's a brute force approach, but definitely...

> ```cmake > foreach(src ${SOURCE_FILES}) > if(src MATCHES ".*\.m$") > set_property(SOURCE "${src}" APPEND_STRING COMPILE_FLAGS " -x objective-c") > endif() > endforeach() > ``` Of course, it seems the issue is...

@madebr this suggestion ``` foreach(src ${SOURCE_FILES}) if(src MATCHES ".*/.m$") set_property(SOURCE "${src}" APPEND_STRING COMPILE_FLAGS " -x objective-c") endif() endforeach() ``` Doesn't look like it's working, unfortunately. So far the only way...

> Have you confirmed that the enable(OBJC) is actually executed? Yes, `enable_language(OBJC)` is called > Also, can you provide the value of some [CMAKE__SOURCE_FILE_EXTENSIONS](https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_SOURCE_FILE_EXTENSIONS.html) variables? Sure ### **.build/CMakeFiles/3.24.1/CMakeOBJCCompiler.cmake** ``` set(CMAKE_OBJC_COMPILER...

@madebr I can tell you that replacing `enable_language(OBJC)` with `enable_language(OBJCXX)` does the trick. Maybe we might need to actually keep both I will clean all my builds and retest this...