Commit b83a019d68a7d35363830988a2d172d7a348108a

Ryan C. Gordon 2021-08-04T19:22:10

cmake: Force linker to treat input as a C++ program on Haiku. Reference issue #4590.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a1bda7b..94a6ad1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,6 +10,10 @@ if(WINDOWS_STORE)
   add_definitions(-DSDL_BUILDING_WINRT=1 -ZW)
 endif()
 
+if (HAIKU)
+  set(LINKER_LANGUAGE CXX)
+endif()
+
 # !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property
 # !!! FIXME:  for the SDL2 shared library (so you get an
 # !!! FIXME:  install_name ("soname") of "@rpath/libSDL-whatever.dylib"