Commit Graph

502 Commits

Author SHA1 Message Date
Florent Castelli 5984ca26f3 wx: Move platform defines to wx setup header
Usually, this is passed as a preprocessor definition, but this is error
prone and just complicating the compiler invocation for no good reason.
2017-02-06 04:27:06 +01:00
Florent Castelli 8464480ceb cmake: Remove -nopie, -no-pie should be used instead 2017-02-06 04:25:28 +01:00
Florent Castelli d096b7b378 cmake: Prevent gtest from installing its files 2017-02-05 20:19:30 +01:00
Florent Castelli 5058d07861 cmake: Fix resource installation for Linux 2017-02-05 20:17:11 +01:00
Florent Castelli 2fceb016b4 cmake: Move ALSA detection to AudioCommon 2017-02-05 02:55:05 +01:00
Michael Maltese 38816bf51d CMake: use BundleUtilities to fix up Dolphin.app 2017-02-03 22:27:19 -08:00
Florent Castelli fb02a321b6 cmake: Move OpenSLES detection to AudioCommon through find_package() 2017-02-04 03:38:11 +01:00
Mat M a3ba169e7d Merge pull request #4809 from Orphis/cmake_windows
CMake for Windows: getting a working binary!
2017-02-03 08:33:13 -05:00
Florent Castelli 3842a9b71c OpenAL: Move Windows binaries to lib folder and fix CMake detection
The module FindOpenAL is looking for the dll in a folder called lib, not x64.
This is only used on Windows x64, it's fine to remove the platform name.
2017-02-03 04:54:54 +01:00
Florent Castelli 8bd41ad606 cmake: Add missing Windows link flags 2017-02-03 04:54:30 +01:00
Florent Castelli 7ccbe9b06d portaudio: Prevent files from being install()'ed 2017-02-03 04:24:13 +01:00
Florent Castelli 9180c87197 cmake: Put test targets in folders 2017-02-03 04:23:24 +01:00
Mat M 1dd229fac8 Merge pull request #4752 from Orphis/cmake_cleanup
cmake: Improve support for multi-configuration generators
2017-02-02 20:59:13 -05:00
Florent Castelli 0f9a6697fb DolphinWX: Update how localization files are installed
On macOS, we want them copied in the bundle directly, otherwise we will
install them later in the system folder.
Obviously not working for Windows, but that's not any different from before!
2017-02-02 03:51:32 +01:00
Florent Castelli 62c439814f cmake: Move Qt5 search to DolphinQt build script 2017-02-01 21:49:26 +01:00
Florent Castelli 8ef5b6d302 cmake: Removes check against CMAKE_BUILD_TYPE for multi-configuration generators 2017-02-01 21:44:50 +01:00
Florent Castelli 8882f33e94 cmake: Add dolphin_compile_definitions function
This is similar to add_definitions, but supports generator expressions.
It also has an optional argument to add only to Debug or Release
configurations.
2017-02-01 21:44:50 +01:00
Florent Castelli f5fd5477e3 cmake: Use new option in check_and_add_flag to add options correctly
Previously, -ggdb wouldn't be added when using the Xcode generator.
And now, the code for -fomit-frame-pointer is much more simple.
2017-02-01 21:44:50 +01:00
Michael Maltese 497173f665 CMake: Disable PortAudio support for ASIO, DS, and WDMKS
Fixes a link-time error, and matches what the vcxproj does.
2017-01-27 02:50:50 -08:00
Michael Maltese 0475a85195 CMake: Move Windows defines to Source/CMakeLists.txt
Messes up various Externals, like PortAudio.
2017-01-27 02:50:49 -08:00
Michael Maltese 4a422dffaa CMake: CMAKE_SIZEOF_VOID_P must be 8 for an x86_64 build
This is an issue because CMAKE_SYSTEM_PROCESSOR is defined as the host
processor when not cross-compiling, and building for Win32 doesn't count
as cross-compiling.
2017-01-27 02:50:36 -08:00
Florent Castelli bf2890f1f8 cmake: Change else(.*) to else() 2017-01-25 15:07:32 +01:00
Florent Castelli 87380c1c2c cmake: Change endif(.*) to endif() 2017-01-25 15:07:32 +01:00
Florent Castelli 2fd034789e cmake: Move /MP flag to MSVC compile flag section 2017-01-25 06:10:20 +01:00
Florent Castelli 221f991f1e cmake: Move section to disable PIE with the other compiler flags 2017-01-25 06:10:20 +01:00
Florent Castelli 1dda078c61 cmake: Compile on Windows with C++ Exceptions 2017-01-25 06:10:20 +01:00
Florent Castelli d2cb5e6407 cmake: Small random cleanups 2017-01-25 06:10:20 +01:00
Florent Castelli aac17b06d1 cmake: Split compile definitions and options 2017-01-25 06:10:20 +01:00
Florent Castelli 5129ba1289 cmake: Add section with Windows defines 2017-01-25 06:10:19 +01:00
Florent Castelli fafb103c52 cmake: Move LTO settings lower in the file 2017-01-25 06:10:19 +01:00
Florent Castelli 925297d528 cmake: Simplify setting arch flags on macOS 2017-01-25 06:10:19 +01:00
Florent Castelli 3e28ebc31e cmake: Fix arch detection
Windows arch is set to AMD64, and we don't really want ix86 either
2017-01-25 06:10:19 +01:00
Florent Castelli c48617008d cmake: Regroup compilation flags together 2017-01-25 06:10:19 +01:00
Florent Castelli ff4ef08745 cmake: Readd fomit-frame-pointer on macOS
Make it also properly set on Release for multi-configuration generators
2017-01-25 06:10:19 +01:00
Florent Castelli 8f355962ce cmake: Move include higher up in the file 2017-01-25 06:10:19 +01:00
Florent Castelli ec84c26975 cmake: Remove unused variable 2017-01-25 06:10:18 +01:00
Florent Castelli b9127cd2e0 cmake: Regroup definitions for 64bit file offsets 2017-01-25 06:10:18 +01:00
Florent Castelli a2e40a11d7 Fix typo MinSizeRe -> MinSizeRel 2017-01-25 06:10:18 +01:00
Florent Castelli 08b73b8a77 cmake: Move check_and_add_flag to a separate file
Also make it add flags to both C and C++ when appropriate
2017-01-25 02:34:33 +01:00
Markus Wick eed64bb0fe Merge pull request #4744 from ligfx/cleanup-osx-cmake
CMake: Cleanup macOS-related logic
2017-01-24 14:36:10 +01:00
Michael Maltese c85127c973 CMake: move CMAKE_MACOSX_RPATH with rest of macOS logic 2017-01-24 01:27:42 -08:00
Michael Maltese b65b87c8b4 CMake: don't need to force Clang on macOS
It's already the default!
2017-01-24 01:27:42 -08:00
Michael Maltese 7ebb1b4d3d CMake: find_package(Threads) on macOS too 2017-01-24 01:27:41 -08:00
Michael Maltese 4cbd07b81f CMake: remove unneeded macOS frameworks 2017-01-24 01:27:41 -08:00
Michael Maltese 0ab3b1a3ff CMake: use CMAKE_OSX_DEPLOYMENT_TARGET 2017-01-24 01:27:41 -08:00
Michael Maltese 951eb9a801 CMake: use CMAKE_OSX_ARCHITECTURES 2017-01-23 23:44:38 -08:00
Florent Castelli a917d247ed DolphinWX: Remove HAVE_WX preprocessor define
I think we don't have to double check it when building the WX target.
2017-01-24 05:48:08 +01:00
Florent Castelli fa04c1479e cmake: Remove PCH support
Compilers are very picky and don't use PCH when they have been compiled
with different flags. I even got some ICE in MSVC, so removing them for now.

Modules are the solution.
2017-01-24 03:22:03 +01:00
Florent Castelli 6c197a8f6a cmake: Rename variable for libxi to X11_INPUT 2017-01-21 02:44:18 +01:00
Florent Castelli 08d6a24bbc cmake: Build HIDAPI on Windows 2017-01-21 00:34:02 +01:00
Florent Castelli 56559c51cf cmake: librt is found only on Linux 2017-01-21 00:34:02 +01:00
Florent Castelli 4785802b9e cmake: Move C++ standard requirement out of global scope to Source/ 2017-01-20 17:46:40 +01:00
Florent Castelli 17187694f6 cmake: Add CCache support 2017-01-17 22:39:51 +01:00
Florent Castelli 6829b42846 cmake: Don’t use message(“”)
If there’s no category, the message ends up in stderr instead of stdout with the other regular CMake output.
2017-01-17 22:39:51 +01:00
Florent Castelli 2c6d2dd1e3 cmake: Find programs on the host too when building for Android 2017-01-17 22:39:51 +01:00
Florent Castelli 62eccff315 Remove policy check for BSD as it is ON by default now 2017-01-17 21:50:44 +01:00
Florent Castelli 875563787f cmake: include(Find…)->find_package(…) 2017-01-17 21:50:44 +01:00
Mat M 81358dbf20 Merge pull request #4674 from Orphis/require_gcc5
cmake: Enforce minimum GCC version
2017-01-17 14:35:38 -05:00
Florent Castelli 868c59dd1c cmake: Enforce minimum GCC version 2017-01-17 20:02:21 +01:00
Lioncash bae0158fc1 CMakeLists: Make CMake 3.5.0 the minimum requirement 2017-01-17 13:36:39 -05:00
Jeffrey Pfau 1b161aad6b CMake: Search /usr/local paths on BSD
CMake would have trouble with some configuration tests on FreeBSD (and
presumably other BSDs) due to installed libraries being in /usr/local, but
not being in the default search path. Adding these to the default search path
fixes mbedtls and portaudio not being found, and possibly more.
2017-01-17 00:46:10 -08:00
Florent Castelli 5955c86ec5 cmake: Set MACOSX_RPATH to OFF
In newer versions of CMake, the variable is ON by default.
This generates imports like @rpath/libusb.dylib which the
packaging script doesn’t understand.
We don’t really need @rpath, so we can just disable it
at the global scope instead of fixing the script.
2017-01-17 04:23:56 +01:00
Emmanuel Gil Peyrot de485f3efc CMake: Add an option to disable bluez support.
This removes bluetooth support.
2016-12-27 15:08:33 +01:00
Emmanuel Gil Peyrot c57f7414a8 CMake: Add an option to disable LLVM support.
This makes the disassembler only work for x86.
2016-12-27 15:08:13 +01:00
Emmanuel Gil Peyrot 6033250beb CMake: Add an option to disable each sound backend.
They are already disabled when the libraries can’t be found, this only
helps people who want to build without them despite having them
installed, for example to provide a package to someone else.
2016-12-27 15:08:10 +01:00
Grant Paul 449ae01db6 Remove dead code to set the path to the macOS SDK.
CMake autodetects a macOS SDK into `CMAKE_OSX_SYSROOT`. There's no
need to duplicate that logic and search out a specifc old version.
2016-12-08 20:53:12 -08:00
Léo Lam f270438a8a CMakeLists: Fix indentation 2016-11-20 18:11:57 +01:00
Jules Blok 49ac577ac0 Merge pull request #4388 from ligfx/portaudio_static
CMake: build PortAudio as static library
2016-11-01 18:32:12 +01:00
Michael Maltese 04e262513c CMake: build PortAudio as static library
Due to issues raised in #4255.
2016-10-26 11:53:14 -07:00
Chris Burgener 6fde08bc34 Check if compilers support -no-pie or -nopie 2016-10-21 10:36:33 -04:00
Chris Burgener d03a35ac92 Add -no-pie flag to CMake 2016-10-19 09:52:30 -04:00
Michael Maltese ecb095f576 CMake: Fix macOS compile by always setting LIBUSB_FOUND=true
Without this, compilation complains about undefined symbols related to
`CWII_IPC_HLE_Device_hid` and `CWII_IPC_HLE_Device_usb_oh1_57e_305_real`.
2016-10-15 16:24:39 -07:00
degasus 05eff01229 Android: Update the gradle file to use android studio 2.2 cmake. 2016-10-05 23:44:10 +02:00
Léo Lam 843b030eda WiimoteReal: Add a hidapi IO implementation
Based on ca0c2efe7a. Credits go to flacs.
However, unlike the original commit, hidapi does not completely replace
the current implementations, so we can still connect Wiimotes with 1+2
(without pairing).

Also, it is only used on Linux and OS X for now. This removes the
advantage of having only one implementation but there is no other
choice: using hidapi on Windows is currently impossible because
hid_write() is implemented in a way that won't work with Wiimotes.

Additionally:
* We now check for the device name in addition to the PID/VID so we can
  support the Balance Board and maybe third-party Wiimotes too. This
  doesn't achieve anything with the DolphinBar but it does with hidraw.
* Added a check to not connect to the same device more than once.
2016-10-03 11:41:23 +02:00
shuffle2 f71966866b Merge pull request #4230 from ligfx/build_vendored_libusb
Build vendored libusb with CMake if on Apple or not available system-wide
2016-10-02 21:17:01 -07:00
shuffle2 c62bfeba07 Merge pull request #4255 from ligfx/portaudio_build_externals
Build portaudio from Externals when not available on system
2016-10-02 20:53:54 -07:00
Michael Maltese 08d9c46b79 Build portaudio from Externals when not available on system
TL;DR: Enables mic support on macOS builds
2016-09-28 13:43:02 -04:00
Michael Maltese eb4d980d2f Ignore LIBUSB_FOUND on Apple
It shouldn't be set in the first place, and its cached value is screwing
up the buildbots.
2016-09-28 13:32:17 -04:00
Michael Maltese 8bb2139224 Build vendored libUSB with CMake 2016-09-28 13:32:07 -04:00
Michael Maltese cd19c9fa22 Don't force compile everything as Objective-C++ on macOS 2016-09-18 17:33:51 -07:00
Jasper St. Pierre 928d05ec47 InputCommon: Remove the Xlib backend
The XInput2 backend is more performant, so let's default to it and
remove the old, core-only backend.
2016-09-04 10:44:22 -07:00
Preston Smith f212d856b3 Fix wxWidgets build for 32-bit arch 2016-08-30 18:17:17 -05:00
Pierre Bourdon c6fed0565d Merge pull request #4109 from JosJuice/remove-am-baseboard
Remove AM Baseboard
2016-08-11 16:16:23 +02:00
Stenzek 951fc44d86 Externals: Add glslang from Vulkan SDK v1.0.21.1 2016-08-11 22:40:32 +10:00
JosJuice 3bb0e7e3f5 Remove AM Baseboard
Let's stop pretending that we support Triforce emulation.
Keeping this code around just in case someone will make
major improvements in the future isn't really worth it.

I'm keeping the Triforce game INIs so users will know that
the compatibility rating for Triforce games is 1 star (broken).
2016-08-11 12:53:44 +02:00
Alex Wang 77ed5756dc Capitalize Foundation library name
On a case-sensitive filesystem, the "foundation" library can not be
found, as the framework starts with a capital "F". Because the
Foundation framework is required by other parts of the build, this
causes the build to fail.

Should help with future builds, too, as the upcoming APFS is
case-sensitive.
2016-07-23 15:10:55 -04:00
EmptyChaos f57cb1bb31 CMake: Bundle FindBacktrace since its missing from older versions. 2016-07-19 13:15:28 +10:00
JDV b6fa1f5f0b Remove Backtrace as it is not actually needed 2016-07-18 15:23:05 -06:00
Anthony J. Bentley fb1627a696 Install manpages and XDG files on OpenBSD and FreeBSD. 2016-07-17 20:32:25 -06:00
Matthew Parlane 4b9173ca62 Merge pull request #4017 from bentley/openbsd-libs
OpenBSD neither provides nor requires libdl and librt.
2016-07-18 12:42:14 +12:00
Anthony J. Bentley eb4cae78aa OpenBSD neither provides nor requires libdl and librt. 2016-07-17 18:06:38 -06:00
Anthony J. Bentley 5bab6210ef Use the standard stat()/fstat() interfaces, not nonstandard *64().
Most modern Unix environments use 64-bit off_t by default: OpenBSD,
FreeBSD, OS X, and Linux libc implementations such as Musl.

glibc is the lone exception; it can default to 32 bits but this is
configurable by setting _FILE_OFFSET_BITS.

Avoiding the stat64()/fstat64() interfaces is desirable because they
are nonstandard and not implemented on many systems (including
OpenBSD and FreeBSD), and using 64 bits for stat()/fstat() is either
the default or trivial to set up.
2016-07-17 04:30:00 -06:00
Mat M fac7d09091 Merge pull request #3737 from EmptyChaos/update-wx
Externals: Update wxWidgets to 3.1.0
2016-07-15 09:48:14 -04:00
EmptyChaos 822326eea9 Update wxWidgets to 3.1.0
From wxWidgets master 81570ae070b35c9d52de47b1f14897f3ff1a66c7.

include/wx/defs.h -- __w64 warning disable patch by comex brought forward.

include/wx/msw/window.h -- added GetContentScaleFactor() which was not implemented on Windows but is necessary for wxBitmap scaling on Mac OS X so it needs to work to avoid #ifdef-ing the code.

src/gtk/window.cpp -- Modified DoSetClientSize() to direct call wxWindowGTK::DoSetSize() instead of using public wxWindowBase::SetSize() which now prevents derived classes (like wxAuiToolbar) intercepting the call and breaking it. This matches Windows which does NOT need to call DoSetSize internally. End result is this fixes Dolphin's debug tools toolbars on Linux.

src/osx/window_osx.cpp -- Same fix as for GTK since it has the same issue.

src/msw/radiobox.cpp -- Hacked to fix display in HiDPI (was clipping off end of text).

Updated CMakeLists for Linux and Mac OS X. Small code changes to Dolphin to fix debug error boxes, deprecation warnings, and retain previous UI behavior on Windows.
2016-06-26 15:25:29 +10:00
comex 659d079d5c Fix in-tree build (cmake .) on OS X.
OS X uses a case insensitive filesystem by default: when I try to build,
a system header does #include <assert.h>, which picks up
Source/Core/Common/Assert.h.  This only happens because CMakeLists adds
'${PROJECT_BINARY_DIR}/Source/Core/Common' as an include directory: in
an out-of-tree build, that directory contains no other source files, but
in an in-tree build PROJECT_BINARY_DIR is just the source root.

This is only used for scmrev.h.  Change the include directory to
'${PROJECT_BINARY_DIR}/Source/Core' and the include to
"Common/scmrev.h", which is more consistent with normal headers anyway.
2016-06-25 23:57:17 -04:00
Pierre Bourdon ac267a2940 5.0 release 2016-06-24 10:09:07 +02:00
Chris Burgener 09dbe2337c Merge pull request #3904 from dhustkoder/master
_DEFAULT_SOURCE flag added, and clang check version for IsTriviallyCopyable m…
2016-06-22 10:54:39 -04:00
dhust 19fed720ff _DEFAULT_SOURCE flag added, and clang check for IsTriviallyCopyable macro
fix clang ver check for 4.0 +

using clang macro __has_feature

__GLIBCXX__ check added

fix __has_feature
2016-06-19 18:32:19 -03:00
Pierre Bourdon 49ce9b153d scmrev: Add "distributor" option.
Used to distinguish between Dolphin distributions (e.g. "dolphin-emu.org",
"Ishiiruka", etc.).
2016-06-18 18:31:40 +02:00
Pierre Bourdon c4f5c471bb Externals: Add libcurl. 2016-06-18 18:31:40 +02:00