add -fobjc-exceptions for compiling linkback sources with g++ and cmake on Mac

Original patch is from Ramanathan Vishnampet
This commit is contained in:
Stephan Witt 2014-02-19 16:11:03 +01:00
parent c3de934350
commit cfe9724a4c
2 changed files with 11 additions and 0 deletions

View File

@ -315,6 +315,14 @@ def main(argv, contributors):
# Store the raw data.
contributors = [
contributor(u"Ramanathan Vishnampet",
"rvishnampet () gmail ! com",
"GPL",
"Re: [Patch] -fobjc-exceptions for compiling linkback sources with g++ on Mac",
"",
"17 February 2014",
u"Support for g++ on 4.8 Mac"),
contributor(u"Ronen Abravanel",
"ronena () gmail ! com",
"GPL",

View File

@ -81,6 +81,9 @@ lyx_add_gcc_pch(support)
if(APPLE)
target_link_libraries(support "objc" "-framework AppKit" "-framework CoreFoundation")
if(CMAKE_COMPILER_IS_GNUCXX)
set_source_files_properties(${support_sources} PROPERTIES COMPILE_FLAGS "-fobjc-exceptions")
endif()
elseif(WIN32)
target_link_libraries(support shlwapi psapi)
endif()