We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2391 - Build failed if include SDL CMakeLists.txt from another project
Summary: Build failed if include SDL CMakeLists.txt from another project
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: HG 2.1
Hardware: x86 Mac OS X 10.8
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-11 19:45 UTC by Ivan Vashchaev
Modified: 2015-05-28 15:31 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Vashchaev 2014-02-11 19:45:04 UTC
If setted -std=c++11 compiler flag (I think and any other C++ related flags) .m files can't compile

Fix:
diff -r e749005cfd72 CMakeLists.txt
--- a/CMakeLists.txt	Mon Feb 10 13:40:02 2014 -0800
+++ b/CMakeLists.txt	Tue Feb 11 23:28:14 2014 +0400
@@ -991,6 +991,7 @@
   if(SDL_FILESYSTEM)
     set(SDL_FILESYSTEM_COCOA 1)
     file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/cocoa/*.m)
+	set_source_files_properties(${FILESYSTEM_SOURCES} PROPERTIES LANGUAGE C)
     set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES})
     set(HAVE_SDL_FILESYSTEM TRUE)
   endif()
Comment 1 Ryan C. Gordon 2015-02-19 05:22:21 UTC
Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry if you got a lot of email from this. This is to help me sort through some bugs in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4, though!