Commit Graph

239 Commits

Author SHA1 Message Date
arcum42 5c60f66890
Fix various cmake issues (#3352)
* Change the minimum cmake version to a range. Uses the new policies of the newer versions if you are on them, taking care of CMP0054.

* Grab a newer version of FindHarfBuzz.cmake from Webkit that fixes the cmake warning the earlier one was giving.

* Add in -ftime-trace as an option on build.sh.

* Precompile PrecompiledHeader.h if you are using cmake 3.16+ and GCC. (Currently disabled on clang due to compilation issues.)

* Check if target_precompile_headers exists rather than by version.

Co-authored-by: scribam <scribam@users.noreply.github.com>
2020-05-07 08:32:34 -07:00
orbea 84d090e2fd
spu2-x: Make portaudio an optional dependency. (#3110)
* spu2-x: Make portaudio an optional dependency.

v2: Fix crash in the audio settings with SDL1 and without portaudio.

* cmake: Add PORTAUDIO_API to disable portaudio support.
2020-05-07 08:31:48 -07:00
Hamish e2d8992310 GSdx: Enable OpenCL on Linux (#3099) 2019-09-11 17:59:33 -07:00
arcum42 014753894a Get rid of extremely spammy warnings when compiling as debug. 2019-08-24 18:47:49 -07:00
arcum42 7679dcf469 clang: Get rid of a number of warnings. I don't need pages of warnings that things clearly marked in the code as deprecated are deprecated, and I doubt I'll be worrying about those overloaded functions any time soon. 2019-08-23 14:40:33 -07:00
Alessandro Vetere 61b984a6c1 BuildParameters.cmake: fix typo 2019-06-18 21:28:57 +02:00
lightningterror 062d141cf1 cmake: Re add the -mxsave flag to compiler flags.
The warnings issue should be resolved now thanks to arcum.
Fixes compiling issues on some systems/distros using gcc 8.2+
Idea by turtleli.

Also add -mfxsr flag suggested by Gregory.
2019-01-02 23:45:23 +01:00
lightningterror 9c0bbfec1f Revert "cmake: Add -mxsave flag to ARCH_FLAG in BuildParameters."
gcc complained about "Wno-packed-not-aligned" and "Wno-class-memaccess"
flags so I won't bother with it, the warnings can be fixed properly
but for now I'll just revert the previous commit.
2018-12-27 06:20:26 +01:00
lightningterror 752dbdefd2 cmake: Add -mxsave flag to ARCH_FLAG in BuildParameters.
A couple of users reported compilation issues using gcc 8.2+ on some
machines/distros on github and discord and adding the -mxsave flag
suggested by turtleli seems to fix the issue.

Fixes #2669
2018-12-27 04:55:50 +01:00
Jonathan Li b84a2cfaf6 cmake: Add -mxsave flag to compiler flags
Fixes compilation when using GCC8.2 to compile a non-native build.

Fixes #2554.
2018-08-16 08:33:57 +01:00
Gregory Hainaut c232f90d6e cmake: add an option to enable openCL
Note: nothing work
2017-02-08 19:42:54 +01:00
np511 f55f3b94a1 Removes LTO warnings and sets -flto=number of cores. 2017-01-03 15:45:24 -05:00
Jonathan Li afe86a5f66 cmake: Only use -fprofile-dir when PGO is used
It stops clang from warning that '-fprofile-dir' is not supported.
2016-12-10 21:51:21 +00:00
np511 b9d57843eb Adds PGO support. Profile data is stored in a folder called profile
in the top-level source directory. The build folder should NOT be
transferred between computers when PGO is used, though I don't
see why anyone would be doing so anyway.

Also adds support for PGO and LTO to the build.sh script.
2016-12-10 11:26:16 +01:00
Gregory Hainaut 0453e5cad8 cmake: improve vtune integration
Year is included in the path so search in order 2018/2017/2016

Not ideal but at least all logic is inside the FindVtune module
2016-12-09 09:28:19 +01:00
np511 46fb6e9b48 Fixes LTO flags. Disables the use of the "gold" linker as a few plugins fail to compile with "gold" and "gold" is not used outside of LTO currently anyway. 2016-11-22 16:10:25 -05:00
Gregory Hainaut dc85989553 cmake: only enable SSE2 on x64 build
SW will generate AVX code anyway
2016-11-20 23:27:13 +01:00
Gregory Hainaut d58e43edbf gsdx linux: plug vtune as Windows 2016-11-19 17:00:32 +01:00
Gregory Hainaut 8b4da69861 cmake: always define avx on 64 bits build 2016-11-19 17:00:32 +01:00
Gregory Hainaut 4ebe739b44 pcsx2: remove various unused variable
Warning can be reenabled on GCC

A warning isn't fixed as potentially the code is wrong
../pcsx2/gui/MemoryCardFolder.cpp: In member function ‘void FolderMemoryCard::FlushFileEntries(u32, u32, const wxString&, MemoryCardFileMetadataReference*)’:
../pcsx2/gui/MemoryCardFolder.cpp:1027:10: warning: unused variable ‘filenameCleaned’ [-Wunused-variable]
     bool filenameCleaned = FileAccessHelper::CleanMemcardFilename( cleanName );
2016-09-10 00:09:05 +02:00
Gregory Hainaut 8fe65ec371 cmake: add -Wextra warning on GCC
Add 3 new warnings (first one must be fixed I think)

pcsx2/gui/MessageBoxes.cpp: In copy constructor ‘BaseMessageBoxEvent::BaseMessageBoxEvent(const BaseMessageBoxEvent&)’:
pcsx2/gui/MessageBoxes.cpp:62:1: warning: base class ‘class pxActionEvent’ should be explicitly initialized in the copy constructor [-Wextra]
 BaseMessageBoxEvent::BaseMessageBoxEvent( const BaseMessageBoxEvent& event )

plugins/GSdx/GSPng.cpp: In function ‘bool GSPng::SaveFile(const string&, GSPng::Format, uint8*, uint8*, int, int, int, int, bool, bool)’:
/home/gregory/playstation/emulateur/pcsx2_merge/plugins/GSdx/GSPng.cpp:64:14: warning: variable ‘success’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
         bool success = false;
              ^
plugins/GSdx/GSPng.cpp:44:58: warning: argument ‘image’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
     bool SaveFile(const string& file, Format fmt, uint8* image, uint8* row,
2016-08-12 19:30:14 +02:00
Gregory Hainaut 11cdb070c0 cmake: use only sse2 flag for ICC
Default is pentium4
2016-07-29 15:00:52 +02:00
Gregory Hainaut 64e8e02f54 cmake: add Intel's ICC compiler support
Full of compilations errors and warnings
2016-07-28 10:36:40 +02:00
František Zatloukal 2c74ff1e54 Degrade GTK3 Fatal Error to Warning 2016-07-13 02:08:14 +02:00
Gregory Hainaut d33bdc7da1 cmake: drop the now useless -no-integrated-as option
close #303
2016-05-26 19:40:02 +02:00
Jonathan Li d2e5c32c83 cmake: Disable SuperVU for non-Linux OS
Doesn't work on FreeBSD, would be annoying to port.
2016-05-21 23:26:19 +01:00
Jonathan Li e23b6e3484 cmake: Setup FreeBSD 2016-05-20 22:31:30 +01:00
Gregory Hainaut 156f1b70c3 cmake: disable avx2+ on debug build
Gdb (7.7.1) doesn't support it properly.
2016-05-17 19:33:12 +02:00
Gregory Hainaut 1208dbe8c7 cmake: add an option to build the new legacy GSdx plugin
+ bump the new one to 1.1.0 (to ease reporting)
2016-04-07 21:46:42 +02:00
Gregory Hainaut ee08a6fc53 Merge pull request #1270 from PCSX2/monolithic-build
Monolithic build
2016-04-03 11:20:07 +02:00
Gregory Hainaut eec3d02737 cmake: fix prof build
It was a dev build actually...
2016-04-02 00:56:41 +02:00
Gregory Hainaut 1bd8113f66 cmake: add various option to disable plugin support 2016-03-30 10:19:54 +02:00
orbea 72699bc988 MAN_DIR added 2016-03-20 23:02:59 -07:00
Gregory Hainaut 1db5e0c0bf cmake: create a prof build type
It is the same as a release build but with the debug symbol and the
frame pointer.
2016-02-21 16:24:47 +01:00
Gregory Hainaut a66c911fed cmake: factorize debug/dev define 2016-02-21 16:17:10 +01:00
Gregory Hainaut 8987ca61a1 cmake: Og for debug build + extra debug information (ggdb3)
GSdx is utterly slow on debug build. -Og enable a couple of debugger-friendly optimization.
2016-02-21 16:05:00 +01:00
Gregory Hainaut 253e801f51 linux: enable float operation on SSE unit
Potentially faster and requires to flush denormal float to 0
2016-02-09 18:24:12 +01:00
Gregory Hainaut 3329bc1748 linux: drop wx2.8 support. Only 3.0 is supported
Close #1152
2016-01-30 12:48:35 +01:00
Gregory Hainaut dd097fe361 cmake: clang, please compile my code quietly 2016-01-09 22:57:43 +01:00
Gregory Hainaut 74db92bee4 Merge pull request #978 from juhalaukkanen/apple_osx_master_merge
OSX 32bit build
2016-01-08 20:09:37 +01:00
Juha Laukkanen b56197d30b Darwin/OSX - cmake which enables apple build and hopefully won't break Linux build.
OSX compilation fix: librt & not wxgl (yet).
2015-12-02 05:00:55 +02:00
Gregory Hainaut 3cefa54789 linux build: enable mfxsr option
Honestly GCC could have enabled it with sse.

Fix #1012
2015-12-01 18:52:59 +01:00
Gregory Hainaut a46204ef9e cmake: add a USE_LTO option
Note: nothing work so don't use it.
2015-11-20 17:36:03 +01:00
Gregory Hainaut 837b62d5e8 cmake: add an option to control PGO 2015-11-14 09:48:53 +01:00
Gregory Hainaut 82520555b3 cmake: reduce warning level on strict-overflow
It is quite verbose
2015-11-02 07:44:11 +01:00
Gregory Hainaut b07621f1a1 cmake: drop ASAN workaround
It was used to mask stack issues. It seems to be fixed with previous commits.

I managed to boot a game without any crash ^^
2015-10-23 22:17:14 +02:00
Gregory Hainaut ffdc914c71 linux: SDL2
For older distribution you can still use SDL1.2

./build.sh ... --sdl12 ...
or
cmake ... -DSDL2_API=FALSE ...

Note: there is a hard dependency between WxWidget and SDL. If Wx is linked against
SDL1.2, you must use SDL1.2. Crashes are expected otherwise.
2015-10-21 22:35:38 +02:00
Jonathan Li 2c2c61920e cmake: Don't add -std=c++11 to CMAKE_C_FLAGS
Fixes a cmake detection problem when compiling with clang (3.7.0 in my
case). clang outputs the error "Invalid argument '-std=c++11' not allowed
with 'C/ObjC'", which causes lzma, Xext and other things to be
considered "not found".
2015-09-21 20:45:50 +01:00
Miguel A. Colón Vélez ddc9c394a2 Don't use O2 in the Debug Build. 2015-08-08 22:10:40 -04:00
nE0sIghT e1272dc2f9 Use global compiler optimization flags instead of defining them for every plugin/binary 2015-08-08 16:25:17 +03:00
Gregory Hainaut bf7ae3a53e Merge pull request #744 from micove/Cmake_Options
Linux: Add Cmake Options
2015-08-08 09:37:53 +02:00
Gregory Hainaut 99d81868fc cmake: use -ggdb instead of -g
Enable all gdb extensions for debug
2015-08-08 09:16:20 +02:00
Miguel A. Colón Vélez 0d344605e1 Use glibc for strcmp and memcmp.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59048
.
The bug is 5+ years old with no fix in sight.
Mesa did some test that showed 50% improvement and enabled it by default.
http://lists.freedesktop.org/archives/mesa-dev/2011-June/009078.html
.
It could also be coded but glibc version has mmx, sse2, and sse4 support.
2015-08-07 05:04:19 -04:00
Miguel A. Colón Vélez 1db74162e6 Update the gcc version requirements.
It no longer builds with 4.6 and 4.7 since it requires features from 4.8.
Start using c++11 since we no longer support 4.5 & 4.6.
2015-08-07 05:03:37 -04:00
Miguel A. Colón Vélez 8a87981d94 Add options to not install optional files. 2015-08-07 02:39:39 -04:00
Miguel A. Colón Vélez 41cc153bff Only check for the needed dependencies.
Helpful for dropping dependencies package dependencies.
- Git only needed if there is a .git folder
- bzip2 only needed by CDVDiso
- CG/GLEW was for zerogs and ZZogl
- jpeg was for ZZogl
.
I also added that EGL_API is also for GSdx in option comment.
2015-07-27 18:54:04 -04:00
Miguel A. Colón Vélez 83a4b37bcf Add an option to disable the inclusion of the build date.
Debian has a goal to make reproducible builds therefore make it an
option instead of distro specific.
.
I added an "OR openSusE" to not "break" the old openSUSE behavior but ideally
they should just use -DDISABLE_BUILD_DATE=TRUE instead.
.
The old -DopenSUSE is not used for anything else so I removed it.
2015-07-27 14:00:47 -04:00
Gregory Hainaut 8d6d8067fd linux: rename everything. It is PCSX2 is uppercase letter
Sorry for all maintainers that will need to upgrade their packages
2015-05-18 10:04:23 +02:00
Gregory Hainaut 335695bd0e purge GLES from GSdx !
mobile will use vulkan (or any new API) anyway
2015-05-01 20:02:17 +02:00
Gregory Hainaut c5e6013d75 Merge pull request #419 from PCSX2/64-bit-crashes-fix
64 bit crashes fix
2015-01-17 12:08:24 +01:00
Gregory Hainaut b03162747c sVU: add an option to remove it
The goal is to reduce the burden for new architecture port.

Patch is mostly inspired from 3kinox initial patch. The diff are
*/ used ifdef instead of raw removal
*/ gui don't rely on UseMicroVU* option
*/ completely remove sVU_micro.* file
2015-01-06 23:45:43 +01:00
Gregory Hainaut e447ffc8b2 cmake: fix asan on 64 bits 2015-01-05 23:45:37 +01:00
Miguel A. Colón Vélez 8440d263cd Respect the CC and CXX environment variables when cross building. 2015-01-04 00:56:47 -05:00
Miguel A. Colón Vélez e23e2ac327 Rely on clang autodetection instead of user input. 2015-01-03 22:07:16 -05:00
Miguel A. Colón Vélez be1842f4e9 Detect clang and automatically set USE_CLANG.
User may forget or not know about -DUSE_CLANG=TRUE. It could probably
be always autodetected instead of requiring user input.
.
Trivial wording changes to compiler_version.
2015-01-03 14:51:04 +01:00
Miguel A. Colón Vélez c8c22cf6a0 Notify about cross build option upon failure.
Tell the user to use CMAKE_TOOLCHAIN_FILE upon failure.
.
Cleanup detectOperatingSystem. Should be the same but adding
GNU and kFreeBSD from Debian and filtering out pre OS X Apple.
.
libaio is linux only. Also check for the correct header since
aio.h is the POSIX one. Both are in /usr/include/ anyway.
Only build core if (Linux AND NOT AIO_FOUND) == false.
.
Use Unix for GTK and X11. Macs has gtk-quartzs and xquartz or native X11.
*BSD, linux, etc should have both.
2015-01-03 14:51:04 +01:00
Miguel A. Colón Vélez bed7a4f92e Be really strict about dependencies.
The obtained binaries before and after this commit are identical (sha1sum)
when compiled in Debian/Ubuntu/Fedora/ArchLinux.
.
The linker will always pick the 32bit libraries the only thing this does is
make sure we have all the 32bit dependencies installed. Basically we avoid
detecting the 64bit libraries and telling the users the 32bit libraries were
found. We always link with 32bit libraries therefore this avoids having to
wait 5-10min to just be told -lXXX is missing.
.
The only thing really needed are
set(CMAKE_LIBRARY_ARCHITECTURE "../lib32")
set(CMAKE_LIBRARY_ARCHITECTURE ".")
.
which basically ensures we don't pick 64bit headers since
CMAKE_LIBRARY_ARCHITECTURE always gets tested first and for some reason
FindGTK2 test searches lib64 first then lib32/lib. These values are hardcoded.
Right now these arch specific headers are not used but can't say this will
always be true.
.
FIND_LIBRARY_USE_LIB64_PATHS is not needed for native builds and it's covered
by CMAKE_SYSTEM_IGNORE_PATH.
.
NOTE:
We filter out lib32 because multilib is not compatible with multiarch.
2015-01-03 14:51:04 +01:00
Miguel A. Colón Vélez 553536f9cb Fix build in Fedora and print a confimation of cross compilation.
- Fedora only needs --arch if cross compiling.
  + It's only used to select libdir so i386=i686=i986
- Messages are nice to debug build logs.
.
Everything seems to work unless some other distro broke. Other
distros need to add CMAKE_TOOLCHAIN_FILE or --cross-multilib if
they cross compiled amd64 -> i686.
2015-01-03 14:51:04 +01:00
Miguel A. Colón Vélez d6d06d243c Begin cleaning up the cross build code.
http://www.vtk.org/Wiki/CMake_Cross_Compiling
http://www.cmake.org/cmake/help/v3.0/manual/cmake-toolchains.7.html
.
The official way that cmake does cross compiling is via the use of a
CMAKE_TOOLCHAIN_FILE. This has to be given by the user and can't be
included from within a Cmake file since setting up the toolchain has
to be the first thing that happens.
.
After the file is given and validated cmake behaves nicely and all the
workarounds and hacks are not really needed anymore.
.
The consequence of this change is that without this file cmake will
try to build for the HOST architecture as expected and with the file
it will build for the TARGET architecture of the given toolchain. Due to
this remove 64BIT_BUILD_DONT_WORK and just ERROR out if the user tries
in the same way as before.
2015-01-03 14:51:04 +01:00
Miguel A. Colón Vélez 8ea0766773 Use TargetArch to correctly detect the target.
Currently crosscompiling was broken since we detected the cpu of the host
not of the target. Building arm -> i386, i386->amd64, etc resulted in
interesting stuff.
.
CMAKE_HOST_SYSTEM_PROCESSOR and CMAKE_SYSTEM_PROCESSOR should have done this
but they are incredibly broken and unreliable. I use
CMAKE_HOST_SYSTEM_PROCESSOR just to retain the format of the old message
and is not used for critical stuff so it does not matter.
.
This code also allows scalability so that if one day in the very distant
and unlikely future the x86/x86_64 specific code gets made portable
by replacing asm/MMX/SSE*/AVX/etc code with generic/portable code then
it also would work on all architectures.
.
For *BSD/OS X it probably would need to use POSIX AIO instead of linux
specific libaio but that is a different issue.
.
Error out the x86_64 builds.
Also the 64BIT_BUILD_DONT_WORK option became obsolete more info in following
commit.
2015-01-03 14:51:04 +01:00
Gregory Hainaut 0c17d67fa5 cmake: add a new option to select the doc path in package mode
DOC_DIR_COMPILATION=/usr/share/doc/pcsx2

close issue #402
2014-12-21 16:51:41 +01:00
Gregory Hainaut dc1cd3eb25 cmake: forbid user to use experimental flags
Namely GTK3_API and 64BIT_BUILD_DONT_WORK

The former was barely tested and doesn't compile with standard wx
The latter doesn't work at all

Note: I was very close to disable SDL2 too.  If wxWidget was built with
SDL1 support it will crash
2014-12-21 10:46:33 +01:00
Gregory Hainaut 1f54bb73aa cmake: enable some aggressive warning
Allow to track strict aliasing issue and overflow
2014-12-20 13:43:25 +01:00
Gregory Hainaut 66d7aa75e2 cmake: move -DNDEBUG to global option 2014-12-20 13:43:25 +01:00
Gregory Hainaut 800262fc14 cmake: add a new GTK3.0 option
Thanks #micove for the patch
2014-12-10 22:07:48 +01:00
Gregory Hainaut c945aead54 cmake: better support of SDL2
Description: Building with SDL2_API=TRUE is incomplete
 SDL_FOUND does not imply SDL2_FOUND
 Use check_libs for detection
 Only include ${SDL_INCLUDE_DIR} when needed
 Use SDL2_LIBRARIES
Author: Miguel A. Colón Vélez

Gregory: add back SDL_BUILDING_LIBRARY
2014-12-07 12:19:14 +01:00
Gregory Hainaut 4b6632edf4 linux: use wx3.0 by default
+ Wx3.0 fixes various issue on linux (better sizing of box)
+ Debian doesn't provide wx2.8 anymore. Ubuntu will probably follow soon (close issue #342)

If you want to use wx2.8:
* Either you remove wx3.0 from your system
* Either you use the cmake option -DWX28_API=TRUE

Please don't hesitate to report any regresions.
2014-12-06 19:59:32 +01:00
3kinox 06f53b2689 use -fabi_version=6 only for GSdx, solve bug with wxwidget
reenable avx build for GSdx
2014-11-11 15:55:31 +01:00
Gregory Hainaut ec1da2805c pcsx2/GSdx: disable AVX for the moment on linux
I need to check carefully the consequence of ABI change. So far wx is very unhappy!

Fatal Error: Mismatch between the program and library build versions detected.
The library used 2.8 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.6),
and your program used 2.8 (no debug,Unicode,compiler with C++ ABI 1006,wx containers,compatible with 2.6).
2014-11-09 15:45:54 +01:00
Gregory Hainaut 679fa65b84 cmake: By default optimize for current arch
Note: it requires GCC 4.7. Otherwise use -DDISABLE_ADVANCE_SIMD=OFF to restore
previous behavior. It will impact Ubuntu precise (12.04)
2014-10-26 14:47:35 +01:00
nE0sIghT 7f57692ee3 Use cmake variable "BIN_DIR" for binaries installation 2014-09-27 22:26:42 +04:00
Gregory Hainaut 9c81272278 cmake: oups forget to change the usage of 64BIT_BUILD variable 2014-09-13 14:22:41 +02:00
Gregory Hainaut e101a1d77a linux build: let's be clear that 64 bit is not supported
* rename the cmake option to 64BIT_BUILD_DONT_WORK
* add --64-bit-dont-work to build.sh
2014-09-12 20:10:14 +02:00
Gregory Hainaut 61088b71c6 cmake: gcc warning management
* disable unused value warning (don't like the syntax 0&&)
* remove -Wno-ignored-attributes (c option). It replaces gcc warning
    by an unsupported option warning...
2014-08-03 14:43:08 +02:00
Gregory Hainaut f38c6d0995 Merge pull request #142 from Sonicadvance1/fPIC_x86_64
Enable -fPIC on x86_64.
2014-07-30 00:01:08 +02:00
Gregory Hainaut d09fee90ad wx3.0: add cmake support (2.8 by default)
use ./build.sh --wx30 for wx3.0
2014-07-29 20:45:43 +02:00
Ryan Houdek 8c07d4e7b9 Enable -fPIC on x86_64.
-fPIC is required on x86_64 for shared libraries.
This allows the compilation to get farther in to plugin compiling.
2014-07-26 03:08:35 -05:00
Ryan Houdek a1a0ed0563 Support _M_X86[_32/_64] on Linux.
These go hand in hand with PR #109 but for Linux as well.

These are much more useful defines than what other compilers give us.
2014-07-14 23:58:02 -05:00
Gregory Hainaut f85a4c0467 clang: don't use clang asm tool
-no-integrated-as fixes most of the asm issue :)
2014-07-14 13:58:06 +02:00
Gregory Hainaut c60fefa1a6 gcc: support address sanitizer 2014-07-12 19:57:26 +02:00
Gregory Hainaut 8c03d50421 cmake: remove a specific warning for clang 2014-07-12 16:04:57 +02:00
Gregory Hainaut f401f817ed cmake: sdl opt typo + clean warning management
Add back a lots of warning in the core!
2014-07-12 12:59:23 +02:00
Ryan Houdek 1f188b2610 Remove -march argument on x86_64 build option.
GCC doesn't support pentium4 as a arch target for x86_64. It complains that the architecture doesn't support x86_64
Which to be fair the first few models didn't support 64bit.
Just remove the architecture setting since there isn't a need for it.
2014-07-11 14:32:17 -05:00
Gregory Hainaut 1dba4aceca cmake: reduce a bit cmake syntax cluttering 2014-07-05 15:08:39 +02:00
Gregory Hainaut e8b3532658 cmake: clean main file and option
Move build configuration from CMakeLists to cmake/BuildParameters.cmake where it belongs
Use option syntax for on/off option
Complete a bit previous commit to force all 64bits path detections (likely done by cmake)
2014-07-05 14:54:56 +02:00
Ryan Houdek 35979bb5a6 Add a CMake compile time option for building a 64bit binary.
By default the cmake build will still cross compile a 32bit binary and spout a message about it if not enabled.
This doesn't fix the 64bit build issues, just makes it easier for someone to test 64bit builds in the future.
Look towards a bright future instead of a dark and gloomy past
2014-07-05 05:09:17 -05:00
Gregory Hainaut b7536ca94b zzogl: gcc warning fix
Let's hope variadic macro work on visual

cmake: reenable various warning. With previous fixes it just a matter of a couple of warnings
2014-05-03 10:37:58 +02:00
Gregory Hainaut c37d9c10f7 cmake: git compilation issue + useless warning message
* avoid compilation failure when git -C isn't supported
* don't print missing dependency when EXTRA_PLUGINS isn't activated
* sed /endif(.*)/endif/ because I don't like it
2014-04-17 20:26:16 +02:00
Gregory Hainaut 414ce3589a 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
2014-04-11 09:18:31 +02:00
Gregory Hainaut 605afeff74 cmake: enable -g for debug/dev build
otherwise it is a PITA on gdb
2014-04-06 11:43:40 +02:00
gregory.hainaut 5309dd0e59 zzogl: fix wrong type access
cmake: don't strip by default the binary in release mode
gsdx: disable the regeneration of ogl shader


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5806 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-10 20:25:03 +00:00
gregory.hainaut 5df7af9bc5 cmake:
* new option SDL2_API
* drop GLSL_SHADER_DIR. Useless, shaders are embedded in .h file
* use some hardening flags (for the moment only basic one)
onepad:
* port the code to SDL2 (Note only SDL1 is supported for the moment)
* improve detection of button vs axis (long-standing issue)
* avoid potential overflow on mouse mouvement detection


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5756 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-11-01 21:05:59 +00:00
gregory.hainaut bd5f379044 gsdx ogl:
* uniform was wrongly set before the activation of the program (free driver only)
* Always use only 1 drawbuffer. Easier besides previous setup was wrong for convert:ps_main1

GLES trial (v3):
* add the cmake option GLES_API. Note library (libgles) are hardcoded for the moment
* Disable opengl check
* Disable gl_GetDebugMessageLogARB not supported!
* Emulate gl_DrawElementsBaseVertex, add manually the index offset (surely slow but work)
* Fix hundred of shader error (no implicit cast of integer to float...)
Unfortunately GLES doesn't support dual blending so no blend in hardware renderer. Otherwise it is fine




git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5700 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-12 21:12:34 +00:00
gregory.hainaut ba20bb0258 pcsx2: gcc warning round 3
* various cast was overflowing
 - use unsigned integer for SSE mask
 - force SINGLE macro to use u32
* disable parenthesis warning, only a matter of coding style

Remains 2 wrong use of unsigned integer:
pcsx2/CDVD/InputIsoFile.cpp:96:21: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
pcsx2/Memory.cpp:108:86: warning: narrowing conversion of ‘-1’ from ‘int’ to ‘vtlbHandler {aka unsigned int}’ inside { } is ill-formed in C++11 [-Wnarrowing]


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5689 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-30 11:43:12 +00:00
gregory.hainaut 40e26648c6 all: gcc warning clean (round 2)
* reorder static initialization list
* Add missing virtual desctrutor to virtual object
* int -> uint/u32/uint32 cast of for loop index
* add a missing return in pxTrySetFocus
* fix size parameter of memset m_clut
* disable missing-field-initializers warning
* disable unused-local-typedefs warning


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5685 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-28 17:32:37 +00:00
gregory.hainaut 3c7167be50 clean (some) gdb warning: round 1
* use svnrev.h on linux too
* replace sprintf_s with snprintf (hope it still compile on Windows)
* init integer with 0 instead of NULL
* various int -> u32/uint32/uint on for loop index
* remove a couple of unused variable
* init few variable
* disable unused warning results


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5683 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-28 10:43:50 +00:00
gregory.hainaut d5b318b990 zzogl:
* move all remaining glx into the dedicated GLwin object
* rework a bit WGL to separate opengl context and window creation (like linux actually)

gsdx: Allow to control vsync. Not sure I used the good extension.

cmake: 
* check that EGL opengl context creation
* Shut up gcc warning when force inline might not work...



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5437 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-10-21 18:10:13 +00:00
gregory.hainaut 1cc654e9bf zzogl: some experiences to EGL (on linux). It can be enabled with -DEGL_API=TRUE
* EGL is the interface between the window and opengl. The purpose is to replace GLX/WGL in a crossplatform way.
  Unfortunately so far only opensource driver use it (need not yet released mesa 9.0)
* clean most of the legacy GSopen1 window management. Only keep a basic window for debug with replayer.



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5422 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-09-23 18:52:44 +00:00
gregory.hainaut 226b2d63b8 gsdx: remove completely the SDL backend. Let's hope I didn't break too much VS
cmake: take the opportunity to drop the support of 3rdparty compilation. Distributions have got a more recent version of zlib/soundtouch anyway.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5376 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-15 10:22:19 +00:00
gregory.hainaut f8875f12dc zzogl: rework dump test, to avoid bad mix between u32/u8
glsl4: Replace some define with function (ogl4 support function pointer). Explain how depth is computed in vertex shader


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5233 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-27 08:13:27 +00:00
gregory.hainaut 2f9e35e5ae i18n: tr_TR pcsx2_Iconized is wrongly translated. I fuzzy all strings to have an english string instead of lookup key
various: apply some patch of Micove to disable debug logging in GSdx release mode 


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5206 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-11 20:52:50 +00:00
gregory.hainaut 75484d3059 cmake: apply some updated pathes of Micove
* drop hack for of Natty and use the std FindGtk2 module, time to upgrade to Precise.
* Bump cmake requirement to 2.8.5 to avoid multiarch issue
* Create new cmake variable GLSL_SHADER_DIR for glsl file.  Default value /usr/share/games/pcsx2


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5200 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-07 16:29:06 +00:00
gregory.hainaut bce948d820 cmake: add a bunch of Micove patch. Thanks.
* Add 2 new dev options: REBUILD_SHADER (nvidia cg) & BUILD_REPLAY_LOADERS
* zzogl-pg-cg will use the shader of zzogl-pg.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5190 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-01 10:54:52 +00:00
gregory.hainaut d487c57f11 zzogl & cmake: fix build failure of previous heavy change
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5168 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-04-20 16:48:03 +00:00
gregory.hainaut e3c741bb2a zzogl: painfully merge the zzogl-dev branch
* new memory management
* asm was replaced by intrinsic
* new GLSL backend (AMD only) Cmake is probably broken anyway with the 2 plugins...
* and lots of others stuff that I forgot about it ;)


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5166 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-04-19 21:22:08 +00:00
gregory.hainaut fff11cf207 i18n: add more fallback for some languages (thanks to pg)
cmake: implement the new XDG_STD options
It allow to move all pcsx2 data from $HOME/PCSX2 to $XDG_CONFIG_DIR/pcsx2. Clearly a matter of personnal preference.
debian: drop the useless stable packet from the trunk. Only keep a copy on branch release



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5001 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-12-21 20:27:03 +00:00
gregory.hainaut c9b1e3c1aa cmake:
* new dev option CMAKE_BUILD_PO: control regeneration of po file. By default true in release build
* Add a hack for multiarch version of wxwidget 


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4951 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-10-31 10:25:24 +00:00
arcum42 5306b13472 More work on the compiler warnings. Removed the warning flags that are now set by default.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4949 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-10-30 00:32:22 +00:00
gregory.hainaut 93fe62f77e cmake: allow to easily set global compilation flags
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4948 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-10-29 11:39:06 +00:00
gregory.hainaut@gmail.com 5adba505e7 pcsx2, zzogl-pg: allow to change some default path with compilation flags.
cmake: Add PLUGIN_DIR and GAMEINDEX_DIR options to easily select install directory. Install GameIndex.dbt during install phase.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4811 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-17 11:25:17 +00:00
gregory.hainaut@gmail.com 83b3ac85d3 cmake:
* use the standard 3 step flow: cmake, make, make install
* Remove L10N_PORTABLE option, superseeded by PACKAGE_MODE
* Extend PACKAGE_MODE to select the install directory (FHS or local bin)


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4805 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-07-14 09:02:37 +00:00
gregory.hainaut@gmail.com 8702685f73 onepad: remember the pad selected (more user expected behavior)
cmake: CDVDiso need gtk2, remove fatal error for 64bits fedora users


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4649 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-05-14 11:03:02 +00:00
gregory.hainaut@gmail.com 2e6951d102 cmake: sdl and gsdx (experimental)
Note: pad plugins crash when linked with sdl 1.3.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4381 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-03-01 19:26:27 +00:00
gregory.hainaut@gmail.com 4bd5322dc6 cmake: WIP to build sdl and GSdx
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4373 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-02-26 20:02:22 +00:00
gregory.hainaut@gmail.com db948003df cmake: add a PACKAGE_MODE option to reduce the burden of packaging
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4289 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-02-12 10:37:44 +00:00
gregory.hainaut@gmail.com cadafe706e cmake: add a L10N_PORTABLE option to allow installing the file in bin/Langs (no superuser right needed)
The option is on by default.

Note: pcsx2 does not detect yet mo file on linux.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4245 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-01-22 12:10:46 +00:00
gregory.hainaut@gmail.com e2cb52becf cmake:
* Link zz with libjpeg. Well it seems to get the library from another place, but better be safe for the future.
* Use -pthread as a default option (again to be safer)
* Warn about breaking of strict aliasing rule 


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3761 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-09-13 15:26:04 +00:00
gregory.hainaut fa793cca25 cmake:
* move machine optimization in the global setup. In same time use i686 instead of i486
* Also build the debug with fvisibility=hidden No reason to use it only on devel. (actually same as codeblock)


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3628 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-08-09 19:05:02 +00:00
gregory.hainaut 83604ec59d cmake: properly separate ldflags from cflags
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3567 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-07-25 14:20:03 +00:00
gregory.hainaut b326504054 [cmake]
* Major rework of the linker flags. Use some globals flags for -s and -m32
  Add a USER_CMAKE_LD_FLAGS variable. Easier to play with advanced link flags for future gcc version (>=4.5)
* Remove useless stub file
[debian]
* minor dependency fix


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3475 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-07-13 09:16:13 +00:00
gregory.hainaut a16f8b6bc4 [cmake] * new cmake option to contol flags (allow user to break everythings^^): USER_CMAKE_C_FLAGS and USER_CMAKE_CXX_FLAGS
For example enable more optimization on c++:
    cmake CMakeLists.txt DUSER_CMAKE_CXX_FLAGS="-O3"
Or more warning on c++:
    cmake CMakeLists.txt DUSER_CMAKE_CXX_FLAGS="-Wstrict-aliasing"


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3417 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-07-07 11:36:54 +00:00
gregory.hainaut 8864c8bbaf [cmake] Move flags clean in the build modules. Next step allow user to control them.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3416 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-07-07 11:08:05 +00:00
gregory.hainaut f8163336b7 [cmake] remove -fPIC. Expect a little speed up.
[plugins] remove __forceinline on variadic function that has been broken by the removal of -fPIC.
[debian] update readme about fpic status. And add some lintian overrides.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3395 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-07-05 15:43:21 +00:00
gregory.hainaut f57ac9d1d9 [cmake]
* move build options to the build module
* Add some documentation about the default cmake build options


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3389 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-07-04 12:37:42 +00:00
gregory.hainaut a11941d318 [cmake] Drop internal bzip version. No reason to use it, moreover compilation is broken for some distribution.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3239 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-19 13:45:30 +00:00
gregory.hainaut 6e118887a5 * Apply a co-patch of Air and me to use linux friendly include path
[cmake]:
* Update to use the above patch.
* Remove a52. Need to use system version.
* Remove stub file. Append pcsx2 to 3rparty library to ease futur support.

Important Note: codeblock will probably need some update. (add 3rdparty/soundtouch_linux_include in include path)


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3200 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-11 13:51:43 +00:00
gregory.hainaut f08d1971ed [cmake]:
* Fix default build option
* Fix futur soundtouch include path


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3189 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-10 07:14:53 +00:00
gregory.hainaut 86a7a85b99 [cmake]
* Add missing file
* Use a default option for FORCE_INTERNAL_SOUNDTOUCH instead of a hardcoded one
* Some cleaning


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3156 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-04 20:35:02 +00:00
gregory.hainaut 5932b130bd * separate build parameter and selection of plugins into new modules. Add comment and status messages
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3148 96395faa-99c1-11dd-bbfe-3dabce05a288
2010-06-03 17:28:20 +00:00