mirror of https://github.com/encounter/SDL.git
Fixed bug 4144 - CMake complains about trailing spaces in sdl2.pc
Azamat H. Hackimov When you try use SDL2 2.0.8 in CMake project in Linux, it complains about trailing spaces in sdl2.pc: CMake Error at CMakeLists.txt:147 (add_executable): Target "TestSimpleMain" links to item "-L/usr/lib64 -lSDL2 " which has leading or trailing whitespace. This is now an error according to policy CMP0004.
This commit is contained in:
parent
a1b8fa6071
commit
db94dfb1d5
|
@ -15752,10 +15752,17 @@ EXTRA_LDFLAGS="$BASE_LDFLAGS"
|
||||||
# fi
|
# fi
|
||||||
#done
|
#done
|
||||||
SDL_CFLAGS="$BASE_CFLAGS"
|
SDL_CFLAGS="$BASE_CFLAGS"
|
||||||
SDL_LIBS="-lSDL2 $BASE_LDFLAGS"
|
SDL_LIBS="-lSDL2"
|
||||||
CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS"
|
if "$BASE_LDFLAGS" != "" ; then
|
||||||
CFLAGS="$CFLAGS $EXTRA_CFLAGS"
|
SDL_LIBS="$SDL_LIBS $BASE_LDFLAGS"
|
||||||
LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
|
fi
|
||||||
|
if "$EXTRA_CFLAGS" != "" ; then
|
||||||
|
CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS $EXTRA_CFLAGS"
|
||||||
|
fi
|
||||||
|
if "$EXTRA_LDFLAGS" != "" ; then
|
||||||
|
LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
|
||||||
|
fi
|
||||||
|
|
||||||
base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'`
|
base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'`
|
||||||
|
|
||||||
|
|
15
configure.in
15
configure.in
|
@ -123,10 +123,17 @@ EXTRA_LDFLAGS="$BASE_LDFLAGS"
|
||||||
# fi
|
# fi
|
||||||
#done
|
#done
|
||||||
SDL_CFLAGS="$BASE_CFLAGS"
|
SDL_CFLAGS="$BASE_CFLAGS"
|
||||||
SDL_LIBS="-lSDL2 $BASE_LDFLAGS"
|
SDL_LIBS="-lSDL2"
|
||||||
CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS"
|
if [ "$BASE_LDFLAGS" != "" ]; then
|
||||||
CFLAGS="$CFLAGS $EXTRA_CFLAGS"
|
SDL_LIBS="$SDL_LIBS $BASE_LDFLAGS"
|
||||||
LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
|
fi
|
||||||
|
if [ "$EXTRA_CFLAGS" != "" ]; then
|
||||||
|
CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS $EXTRA_CFLAGS"
|
||||||
|
fi
|
||||||
|
if [ "$EXTRA_LDFLAGS" != "" ]; then
|
||||||
|
LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
|
||||||
|
fi
|
||||||
|
|
||||||
dnl set this to use on systems that use lib64 instead of lib
|
dnl set this to use on systems that use lib64 instead of lib
|
||||||
base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'`
|
base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'`
|
||||||
|
|
Loading…
Reference in New Issue