diff --git a/CMakeLists.txt b/CMakeLists.txt index add77d321..651a419f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3123,7 +3123,7 @@ endif() if(APPLE) foreach(SOURCE_FILE ${SOURCE_FILES}) get_filename_component(FILE_EXTENSION ${SOURCE_FILE} EXT) - if(FILE_EXTENSION STREQUAL "m") + if(FILE_EXTENSION STREQUAL ".m") set_property(SOURCE ${SOURCE_FILE} APPEND_STRING PROPERTY COMPILE_FLAGS " -x objective-c") endif() endforeach()