summaryrefslogtreecommitdiffstats
path: root/src/openal-1-fixes.patch
blob: f189b49e6e73ee6c85cc1fbfecc5abe9c02f0c65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
This file is part of MXE. See LICENSE.md for licensing information.
From 25b591198c896959ca5b7dc9ad3a35605c66dc63 Mon Sep 17 00:00:00 2001
From: Guilherme Lima Bernal <dev@lbguilherme.com>
Date: Sat, 28 Mar 2015 20:52:05 +0100
Subject: [PATCH] fixes for cross-building


diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0087edb..749f813 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -846,6 +846,7 @@ IF(HAVE_WINDOWS_H)
                 SET(BACKENDS  "${BACKENDS} WinMM,")
                 SET(ALC_OBJS  ${ALC_OBJS} Alc/backends/winmm.c)
                 SET(EXTRA_LIBS winmm ${EXTRA_LIBS})
+                SET(PKG_CONFIG_LIBS "${PKG_CONFIG_LIBS} -lwinmm")
             ENDIF()
         ENDIF()
     ENDIF()
@@ -862,6 +863,7 @@ IF(HAVE_WINDOWS_H)
             IF(CMAKE_VERSION VERSION_LESS "2.8.8")
                 INCLUDE_DIRECTORIES(${DSOUND_INCLUDE_DIRS})
             ENDIF()
+            SET(PKG_CONFIG_LIBS "${PKG_CONFIG_LIBS} -luuid -lole32")
         ENDIF()
     ENDIF()
 
@@ -873,6 +875,7 @@ IF(HAVE_WINDOWS_H)
             SET(HAVE_MMDEVAPI 1)
             SET(BACKENDS  "${BACKENDS} MMDevApi,")
             SET(ALC_OBJS  ${ALC_OBJS} Alc/backends/mmdevapi.c)
+            SET(PKG_CONFIG_LIBS "${PKG_CONFIG_LIBS} -lole32")
         ENDIF()
     ENDIF()
 ENDIF()
@@ -1027,10 +1030,10 @@ CONFIGURE_FILE(
     @ONLY)
 
 # Build a common library with reusable helpers
-ADD_LIBRARY(common STATIC ${COMMON_OBJS})
+#ADD_LIBRARY(common STATIC ${COMMON_OBJS})
 
 # Build main library
-ADD_LIBRARY(${LIBNAME} ${LIBTYPE} ${OPENAL_OBJS} ${ALC_OBJS})
+ADD_LIBRARY(${LIBNAME} ${LIBTYPE} ${COMMON_OBJS} ${OPENAL_OBJS} ${ALC_OBJS})
 SET_PROPERTY(TARGET ${LIBNAME} APPEND PROPERTY COMPILE_DEFINITIONS AL_BUILD_LIBRARY AL_ALEXT_PROTOTYPES)
 IF(WIN32 AND ALSOFT_NO_UID_DEFS)
     SET_PROPERTY(TARGET ${LIBNAME} APPEND PROPERTY COMPILE_DEFINITIONS AL_NO_UID_DEFS)
@@ -1091,7 +1094,7 @@ IF(WIN32 AND NOT LIBTYPE STREQUAL "STATIC")
     ENDIF()
 ENDIF()
 
-TARGET_LINK_LIBRARIES(${LIBNAME} common ${EXTRA_LIBS})
+TARGET_LINK_LIBRARIES(${LIBNAME} ${EXTRA_LIBS})
 
 # Add an install target here
 INSTALL(TARGETS ${LIBNAME}
-- 
2.1.0