File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,15 @@ install(FILES
157
157
${CMAKE_INSTALL_INCLUDEDIR} /libmodplug
158
158
)
159
159
160
- if (NOT WIN32 )
160
+ if (NOT MSVC )
161
+ if (MINGW OR CYGWIN )
162
+ set (LIBS_PRIVATE "-luser32 -lstdc++" )
163
+ else ()
164
+ set (LIBS_PRIVATE "-lstdc++" )
165
+ if (MATH_LIB)
166
+ set (LIBS_PRIVATE "${LIBS_PRIVATE} -lm" )
167
+ endif ()
168
+ endif ()
161
169
set (prefix ${CMAKE_INSTALL_PREFIX} )
162
170
set (exec_prefix ${CMAKE_INSTALL_PREFIX} )
163
171
set (libdir ${CMAKE_INSTALL_PREFIX} /${CMAKE_INSTALL_LIBDIR} )
@@ -168,4 +176,4 @@ if (NOT WIN32)
168
176
install (FILES "${PROJECT_BINARY_DIR} /libmodplug.pc"
169
177
DESTINATION ${CMAKE_INSTALL_LIBDIR} /pkgconfig
170
178
)
171
- endif (NOT WIN32 )
179
+ endif ()
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ CXXFLAGS="$CXXFLAGS -fno-exceptions -Wall -ffast-math -fno-common -D_REENTRANT"
25
25
26
26
AC_CANONICAL_HOST
27
27
28
+ LIBS_PRIVATE=-lstdc++
28
29
LIBM=
29
30
case "${host_os}" in
30
31
dnl Djgpp has all c89 math funcs in libc.a
@@ -35,14 +36,17 @@ darwin*|haiku*|beos*|cegcc*|pw32*)
35
36
;;
36
37
dnl MinGW and Cygwin don't need libm, either
37
38
mingw*|cygwin*)
39
+ LIBS_PRIVATE="-luser32 ${LIBS_PRIVATE}"
38
40
;;
39
41
dnl All others:
40
42
*) AC_CHECK_LIB ( m , pow , LIBM="-lm" )
41
43
if test x$LIBM != x; then
42
44
LIBS="${LIBS} ${LIBM}"
45
+ LIBS_PRIVATE="${LIBS_PRIVATE} ${LIBM}"
43
46
fi
44
47
;;
45
48
esac
49
+ AC_SUBST ( LIBS_PRIVATE )
46
50
AC_CHECK_FUNCS ( sinf )
47
51
48
52
# symbol visibility
Original file line number Diff line number Diff line change @@ -7,6 +7,6 @@ Name: libmodplug
7
7
Description: The ModPlug mod file playing library.
8
8
Version: @VERSION@
9
9
Requires:
10
- Libs: -L${libdir} -lmodplug
11
- Libs.private: -lstdc++ -lm
10
+ Libs: -L${libdir} -lmodplug
11
+ Libs.private: @LIBS_PRIVATE@
12
12
Cflags: -I${includedir}
You can’t perform that action at this time.
0 commit comments