Patch for CMakeLists.txt to build with new OpenAL libs on VS2012.
authorJürgen Herrmann <shadowrom@me.com>
Wed, 15 May 2013 11:26:57 +0000 (11:26 +0000)
committerJürgen Herrmann <shadowrom@me.com>
Wed, 15 May 2013 11:26:57 +0000 (11:26 +0000)
Because of crashing issue with old Creative Labs OpenAL on Windows 8 x64.

CMakeLists.txt
source/creator/CMakeLists.txt

index c8b4e85167f6b818528b69fdda814497ecf96188..daae377e58f8cfbd85f7c5731e745bde682ea1d0 100644 (file)
@@ -984,7 +984,11 @@ elseif(WIN32)
        if(WITH_OPENAL)
                set(OPENAL ${LIBDIR}/openal)
                set(OPENAL_INCLUDE_DIR ${OPENAL}/include)
-               set(OPENAL_LIBRARY wrap_oal)
+               if(MSVC11)
+                       set(OPENAL_LIBRARY openal32)
+               else()
+                       set(OPENAL_LIBRARY wrap_oal)
+               endif()
                set(OPENAL_LIBPATH ${OPENAL}/lib)
        endif()
 
index cd846eb1978533cd77083d2e8aa216c82ba0e437..eabf1fc7f49076b7d1ae6ca2a11c482c49c35f7e 100644 (file)
@@ -628,12 +628,20 @@ elseif(WIN32)
        endif()
 
        if(WITH_OPENAL)
-               install(
-                       FILES
-                               ${LIBDIR}/openal/lib/OpenAL32.dll
-                               ${LIBDIR}/openal/lib/wrap_oal.dll
-                       DESTINATION ${TARGETDIR}
-               )
+               if(MSVC11)
+                       install(
+                               FILES
+                                       ${LIBDIR}/openal/lib/OpenAL32.dll
+                               DESTINATION ${TARGETDIR}
+                       )
+               else()
+                       install(
+                               FILES
+                                       ${LIBDIR}/openal/lib/OpenAL32.dll
+                                       ${LIBDIR}/openal/lib/wrap_oal.dll
+                               DESTINATION ${TARGETDIR}
+                       )
+               endif()
        endif()
 
        if(WITH_JACK AND MSVC11)