cmake: get_filename_component(EXT) retturns extension including leading dot

This commit is contained in:
Anonymous Maarten 2023-03-15 14:55:56 +01:00
parent 2fe5f3239c
commit 3cbd8823ba
1 changed files with 1 additions and 1 deletions

View File

@ -3271,7 +3271,7 @@ endif()
if(APPLE) if(APPLE)
foreach(SOURCE_FILE ${SOURCE_FILES}) foreach(SOURCE_FILE ${SOURCE_FILES})
get_filename_component(FILE_EXTENSION ${SOURCE_FILE} EXT) 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") set_property(SOURCE ${SOURCE_FILE} APPEND_STRING PROPERTY COMPILE_FLAGS " -x objective-c")
endif() endif()
endforeach() endforeach()