mirror of
https://github.com/libretro/pcsx2.git
synced 2024-11-28 03:40:22 +00:00
cmake: new option -DEXTRA_PLUGINS=TRUE|FALSE
--extra for ./build.sh script By default only build the pricipal plugin: GSdx|zzogl/spu2-x/onepad/UsbNull/Dev9Null Extra plugins are: GsNull|zzogl-cg/Spu2Null|zerospu/PadNull The purpose is to improve compilation time on linux
This commit is contained in:
parent
37b1d3ae42
commit
414ce3589a
53
build.sh
53
build.sh
@ -19,52 +19,55 @@ clean_build=false
|
||||
|
||||
for f in $*
|
||||
do
|
||||
case $f in
|
||||
--dev|--devel ) flags="$flags -DCMAKE_BUILD_TYPE=Devel" ;;
|
||||
--dbg|--debug ) flags="$flags -DCMAKE_BUILD_TYPE=Debug" ;;
|
||||
--release ) flags="$flags -DCMAKE_BUILD_TYPE=Release" ;;
|
||||
--glsl ) flags="$flags -DGLSL_API=TRUE" ;;
|
||||
--egl ) flags="$flags -DEGL_API=TRUE" ;;
|
||||
--gles ) flags="$flags -DGLES_API=TRUE" ;;
|
||||
--sdl2 ) flags="$flags -DSDL2_API=TRUE" ;;
|
||||
--clean ) clean_build=true ;;
|
||||
*)
|
||||
# unknown option
|
||||
echo "** User options **"
|
||||
echo "--dev / --devel : Build PCSX2 as a Development build."
|
||||
echo "--debug : Build PCSX2 as a Debug build."
|
||||
echo "--release : Build PCSX2 as a Release build."
|
||||
echo "--clean : Do a clean build."
|
||||
case $f in
|
||||
--dev|--devel ) flags="$flags -DCMAKE_BUILD_TYPE=Devel" ;;
|
||||
--dbg|--debug ) flags="$flags -DCMAKE_BUILD_TYPE=Debug" ;;
|
||||
--release ) flags="$flags -DCMAKE_BUILD_TYPE=Release" ;;
|
||||
--glsl ) flags="$flags -DGLSL_API=TRUE" ;;
|
||||
--egl ) flags="$flags -DEGL_API=TRUE" ;;
|
||||
--gles ) flags="$flags -DGLES_API=TRUE" ;;
|
||||
--sdl2 ) flags="$flags -DSDL2_API=TRUE" ;;
|
||||
--extra ) flags="$flags -DEXTRA_PLUGINS=TRUE" ;;
|
||||
--clean ) clean_build=true ;;
|
||||
|
||||
*)
|
||||
# unknown option
|
||||
echo "** User options **"
|
||||
echo "--dev / --devel : Build PCSX2 as a Development build."
|
||||
echo "--debug : Build PCSX2 as a Debug build."
|
||||
echo "--release : Build PCSX2 as a Release build."
|
||||
echo "--clean : Do a clean build."
|
||||
echo "--extra : Build all plugins"
|
||||
echo "** Developper option **"
|
||||
echo "--glsl : Replace CG backend of ZZogl by GLSL"
|
||||
echo "--egl : Replace GLX by EGL (ZZogl plugins only)"
|
||||
echo "--sdl2 : Build with SDL2 (crash if wx is linked to SDL1)"
|
||||
echo "--gles : Replace openGL backend of GSdx by openGLES3"
|
||||
exit 1;;
|
||||
esac
|
||||
exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
rm -f install_log.txt
|
||||
|
||||
if [ "$flags" != "" ]; then
|
||||
echo "Building pcsx2 with $flags"
|
||||
echo "Building pcsx2 with $flags" > install_log.txt
|
||||
echo "Building pcsx2 with $flags"
|
||||
echo "Building pcsx2 with $flags" > install_log.txt
|
||||
fi
|
||||
|
||||
if [ "$clean_build" = true ]; then
|
||||
echo "Doing a clean build."
|
||||
echo "Doing a clean build."
|
||||
rm -fr build
|
||||
# make clean 2>&1 | tee -a ../install_log.txt
|
||||
# make clean 2>&1 | tee -a ../install_log.txt
|
||||
fi
|
||||
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
cmake $flags .. 2>&1 | tee -a ../install_log.txt
|
||||
cmake $flags .. 2>&1 | tee -a ../install_log.txt
|
||||
|
||||
CORE=`grep -w -c processor /proc/cpuinfo`
|
||||
make -j $CORE 2>&1 | tee -a ../install_log.txt
|
||||
make install 2>&1 | tee -a ../install_log.txt
|
||||
make -j $CORE 2>&1 | tee -a ../install_log.txt
|
||||
make install 2>&1 | tee -a ../install_log.txt
|
||||
|
||||
cd ..
|
||||
|
@ -9,7 +9,8 @@
|
||||
# Build the Replay Loaders : -DBUILD_REPLAY_LOADERS=TRUE|FALSE
|
||||
# Use GLSL API(else NVIDIA_CG): -DGLSL_API=TRUE|FALSE
|
||||
# Use EGL (vs GLX) : -DEGL_API=TRUE|FALSE
|
||||
# Use SDL2 ; -DSDL2_API=TRUE|FALSE
|
||||
# Use SDL2 : -DSDL2_API=TRUE|FALSE
|
||||
# Build all plugins : -DEXTRA_PLUGINS=TRUE|FALSE
|
||||
|
||||
### GCC optimization options
|
||||
# control C flags : -DUSER_CMAKE_C_FLAGS="cflags"
|
||||
@ -211,3 +212,9 @@ if (NOT DEFINED XDG_STD)
|
||||
set(XDG_STD FALSE)
|
||||
endif (NOT DEFINED XDG_STD)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Use only main plugin (faster compilation time)
|
||||
#-------------------------------------------------------------------------------
|
||||
if (NOT DEFINED EXTRA_PLUGINS)
|
||||
set(EXTRA_PLUGINS FALSE)
|
||||
endif()
|
||||
|
@ -85,20 +85,22 @@ endif(GTK2_FOUND)
|
||||
# requires: -BZip2
|
||||
# -gtk2 (linux)
|
||||
#---------------------------------------
|
||||
if(BZIP2_FOUND AND GTK2_FOUND)
|
||||
if(BZIP2_FOUND AND GTK2_FOUND AND EXTRA_PLUGINS)
|
||||
set(CDVDiso TRUE)
|
||||
elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/CDVDiso")
|
||||
set(CDVDiso FALSE)
|
||||
else(BZIP2_FOUND AND GTK2_FOUND)
|
||||
else()
|
||||
set(CDVDiso FALSE)
|
||||
message(STATUS "Skip build of CDVDiso: miss some dependencies")
|
||||
message(STATUS "${msg_dep_cdvdiso}")
|
||||
endif(BZIP2_FOUND AND GTK2_FOUND)
|
||||
endif()
|
||||
|
||||
#---------------------------------------
|
||||
# CDVDlinuz
|
||||
#---------------------------------------
|
||||
if(EXTRA_PLUGINS)
|
||||
set(CDVDlinuz TRUE)
|
||||
endif()
|
||||
|
||||
#---------------------------------------
|
||||
# dev9null
|
||||
@ -119,9 +121,9 @@ endif(GTK2_FOUND)
|
||||
#---------------------------------------
|
||||
# GSnull
|
||||
#---------------------------------------
|
||||
if(GTK2_FOUND)
|
||||
if(GTK2_FOUND AND EXTRA_PLUGINS)
|
||||
set(GSnull TRUE)
|
||||
endif(GTK2_FOUND)
|
||||
endif()
|
||||
#---------------------------------------
|
||||
|
||||
#---------------------------------------
|
||||
@ -149,15 +151,15 @@ endif(OPENGL_FOUND AND X11_FOUND AND EGL_FOUND)
|
||||
# -X11
|
||||
# -CG
|
||||
#---------------------------------------
|
||||
if(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND CG_FOUND)
|
||||
if(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND CG_FOUND AND EXTRA_PLUGINS)
|
||||
set(zerogs TRUE)
|
||||
elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/zerogs")
|
||||
set(zerogs FALSE)
|
||||
else(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND CG_FOUND)
|
||||
else()
|
||||
set(zerogs FALSE)
|
||||
message(STATUS "Skip build of zerogs: miss some dependencies")
|
||||
message(STATUS "${msg_dep_zerogs}")
|
||||
endif(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND CG_FOUND)
|
||||
endif()
|
||||
#---------------------------------------
|
||||
|
||||
#---------------------------------------
|
||||
@ -172,30 +174,30 @@ endif(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND CG_FOUND)
|
||||
#---------------------------------------
|
||||
if((GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND JPEG_FOUND AND common_libs) AND (CG_FOUND OR GLSL_API))
|
||||
set(zzogl TRUE)
|
||||
if(CG_FOUND AND NOT GLSL_API)
|
||||
if(CG_FOUND AND NOT GLSL_API AND EXTRA_PLUGINS)
|
||||
set(zzoglcg TRUE)
|
||||
else(CG_FOUND AND NOT GLSL_API)
|
||||
else()
|
||||
set(zzoglcg FALSE)
|
||||
endif(CG_FOUND AND NOT GLSL_API)
|
||||
endif()
|
||||
elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/zzogl-pg")
|
||||
set(zzogl FALSE)
|
||||
set(zzoglcg FALSE)
|
||||
set(REBUILD_SHADER FALSE)
|
||||
else((GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND JPEG_FOUND AND common_libs) AND (CG_FOUND OR GLSL_API))
|
||||
else()
|
||||
set(zzogl FALSE)
|
||||
set(zzoglcg FALSE)
|
||||
set(REBUILD_SHADER FALSE)
|
||||
message(STATUS "Skip build of zzogl: miss some dependencies")
|
||||
message(STATUS "${msg_dep_zzogl}")
|
||||
endif((GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND JPEG_FOUND AND common_libs) AND (CG_FOUND OR GLSL_API))
|
||||
endif()
|
||||
#---------------------------------------
|
||||
|
||||
#---------------------------------------
|
||||
# PadNull
|
||||
#---------------------------------------
|
||||
if(GTK2_FOUND)
|
||||
if(GTK2_FOUND AND EXTRA_PLUGINS)
|
||||
set(PadNull TRUE)
|
||||
endif(GTK2_FOUND)
|
||||
endif()
|
||||
#---------------------------------------
|
||||
|
||||
#---------------------------------------
|
||||
@ -217,9 +219,9 @@ endif(SDL_FOUND)
|
||||
#---------------------------------------
|
||||
# SPU2null
|
||||
#---------------------------------------
|
||||
if(GTK2_FOUND)
|
||||
if(GTK2_FOUND AND EXTRA_PLUGINS)
|
||||
set(SPU2null TRUE)
|
||||
endif(GTK2_FOUND)
|
||||
endif()
|
||||
#---------------------------------------
|
||||
|
||||
#---------------------------------------
|
||||
@ -249,18 +251,18 @@ endif()
|
||||
# -ALSA
|
||||
# -PortAudio
|
||||
#---------------------------------------
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/zerospu2" AND SOUNDTOUCH_FOUND AND ALSA_FOUND)
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/zerospu2" AND SOUNDTOUCH_FOUND AND ALSA_FOUND AND EXTRA_PLUGINS)
|
||||
set(zerospu2 TRUE)
|
||||
# Comment the next line, if you want to compile zerospu2
|
||||
set(zerospu2 FALSE)
|
||||
message(STATUS "Don't build zerospu2. It is super-seeded by spu2x")
|
||||
elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/zerospu2")
|
||||
set(zerospu2 FALSE)
|
||||
else(EXISTS "${CMAKE_SOURCE_DIR}/plugins/zerospu2" AND SOUNDTOUCH_FOUND AND ALSA_FOUND)
|
||||
else()
|
||||
set(zerospu2 FALSE)
|
||||
message(STATUS "Skip build of zerospu2: miss some dependencies")
|
||||
message(STATUS "${msg_dep_zerospu2}")
|
||||
endif(EXISTS "${CMAKE_SOURCE_DIR}/plugins/zerospu2" AND SOUNDTOUCH_FOUND AND ALSA_FOUND)
|
||||
endif()
|
||||
#---------------------------------------
|
||||
|
||||
#---------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user