Commit Graph

61 Commits

Author SHA1 Message Date
baldurk 38f0d27901 Use configure_file in CMake to force rebuild if git commit changes
* We also only use GIT_COMMIT_HASH where necessary to avoid rebuilding many
  files for no reason, including splitting version.cpp out into a separate
  project as we do with VS since otherwise changing its preprocessor defines
  rebuilds the whole renderdoc project.
* At the same time, move the git hash to be internal only so we don't have to
  try to link version.cpp into other projects like renderdoccmd or qrenderdoc.
2019-06-20 19:14:14 +01:00
baldurk 8cae484132 Handle all cmake release build types properly 2019-05-17 16:32:55 +01:00
Aliya Pazylbekova 7c0365679f Add GGP build support
- Disable GL and GLES drivers on GGP
- Add flags to keep symbols in release builds. Adds
minimal debug info that preserves backtraces.
- Disable python modules and qrenderdoc for GGP
2019-03-14 01:23:11 +00:00
baldurk 7541dc6bc7 Add cmake compile options for enabling address/thread sanitizer
* Currently tsan doesn't work well in Qt because it doesn't recognise QMutex
2019-02-28 17:48:30 +00:00
baldurk 34a97482dd Add helper shortcut to 'renderdoccmd test' to run functional tests
* This invokes run_tests.py with any arguments but specifies the renderdoc
  module and python module paths automatically. Only works if built within the
  project repo itself as otherwise it won't locate the test script
2019-02-14 15:45:22 +00:00
baldurk 2a80fd29d0 Don't look for source.properties to check valid SDK path
* This file isn't always there apparently. Instead just look for a build-tools
  folder which must be present.
2019-02-04 19:21:10 +00:00
baldurk b5a6e815b9 Locate android SDK/NDK up front from various env vars before building
* We need to locate it before setting the toolchain file, so checking when
  building renderdoccmd is too late. This also lets us print where the SDK/NDK
  is found, and add error messages if we don't locate it properly.
2019-02-04 18:06:10 +00:00
baldurk 14c110ce58 On all platforms, output library to lib folder in cmake build 2019-01-03 12:43:32 +00:00
Jake Turner 8105ddb5ab osx: for cmake set library output to be lib folder
On Apple only set  CMAKE_LIBRARY_OUTPUT_DIRECTORY to be “lib” folder instead of “bin” folder
Fixes osx problem when launching renderdoccmd not being able to find librenderdoc.dylib
RPATH is set to be "@executable_path/../lib" which matches where qrenderdoc.app copies the renderdoc library to

qrenderdoc: set library search folder “-L” to be CMAKE_LIBRARY_OUTPUT_DIRECTORY instead of CMAKE_RUNTIME_OUTPUT_DIRECTORY
2019-01-03 12:21:58 +00:00
baldurk e13c292fac Explicitly select c++_static STL, default Android STL is totally broken 2018-09-26 11:12:44 +01:00
baldurk 5b07a48479 Switch android build to use NDK-provided cmake file
* The existing android cmake file doesn't work with newer NDK releases, so we
  have to use the provided cmake file. It should work in NDKs as far back as
  version 14.
2018-09-25 15:09:54 +01:00
baldurk 00d2bf62ff Enable Vulkan build on mac 2018-09-05 12:50:59 +01:00
baldurk 4e57f295b7 Disable GLES support on mac 2018-07-07 00:38:27 +01:00
baldurk 031d8fd0e5 Enable GLES by default on linux, and display API/winsys status in cmake 2018-07-06 22:44:22 +01:00
baldurk d8a64c4172 Fix compilation on GCC 8. Closes #984 2018-05-15 19:44:17 +01:00
baldurk e91116706c Move scripts/ folder to util/ 2018-05-01 18:53:03 +01:00
baldurk ec7b2807d0 Build each architecture into its own APK
* This means we can have all the architectures we care about installed,
  and load the right library regardless of what the app does.
2018-01-26 21:19:16 +00:00
baldurk dea21b20a0 Remove global GIT_COMMIT_HASH define, use GitVersionHash global var
* On windows, the change in a global GIT_COMMIT_HASH define in each
  project needing it meant a full rebuild every time the commit changed.
* Ideally we'd set the define only on one file in each project, but
  MSBuild doesn't seem to support that. Instead we make a new tiny
  project that compiles a single cpp exporting a global var, and
  reference that global var in each other project.
2018-01-16 20:17:53 +00:00
baldurk b15422f4c1 Re-arrange CMakeLists.txt a bit to separate qrenderdoc & pyrenderdoc
* Now you can build the python modules without building the full UI,
  which is mostly useful for docs builds so we can do a minimal compile
  and still generate the docs.
2017-12-19 18:05:25 +00:00
baldurk 8c5f14436f Add cmake option to strip the output of android builds 2017-12-15 17:33:56 +00:00
baldurk 1a6db595a0 Ignore -Wmaybe-uninitialized on GCC. Refs #815 2017-12-15 12:28:41 +00:00
baldurk 1fe736fdab Also don't pass -Wno-unused-lambda-capture on apple's clang 2017-12-14 09:11:11 +00:00
baldurk 965bcac6ea Try again to detect clang 5.0, because cmake doesn't have a version >= 2017-12-14 02:21:07 +00:00
baldurk 60becb1bb3 Only pass -Wno-unused-lambda-capture on clang 5 and above 2017-12-14 01:33:43 +00:00
baldurk 7838e2c0c6 Disable -Wunused-lambda-capture which complains about nonsense sometimes 2017-12-14 00:20:52 +00:00
baldurk 66d8aba60f Re-enable GL driver 2017-11-08 18:24:41 +00:00
baldurk 15f78b7ffd Re-enable Vulkan driver 2017-11-08 18:24:22 +00:00
baldurk 7562da9a20 Temporarily remove driver support. (See commit msg if bisecting)
* The commits following this add a new refactored serialisation system.
  As a balance between readability of individual commits and ability to
  bisect/compile at interim steps, the individual API back-ends are
  disabled in this commit, so that after the serialisation system is
  committed the project compiles again as soon as possible.
* However this is of course not much use in itself as then the code
  can't function usefully. The drivers are re-enabled as each one is
  updated to the new system, so at least the codebase should stay
  compiling, even if each individual API may not yet be functioning.
2017-11-07 19:30:31 +00:00
baldurk 1992183e8e Add support for specifying a subfolder under the lib/ target. Refs #750
* This allows a buidler to customise from e.g. /usr/lib/librenderdoc.so
  to /usr/lib/renderdoc/librenderdoc.so - which is harmless since the
  library is 'private' and not intended to be linked against directly.
2017-09-26 11:00:17 +01:00
Cody Northrop af896d55e6 cmake: Add variable for custom layer location 2017-07-21 10:29:46 -07:00
baldurk ecf88787d7 Add code to disassemble SPIR-V, glsl and DXBC into GCN ISA.
* Requires binary plugins to function from the RGA repository. These
  will be included with distributions (nightly and stable builds) where
  possible, however D3D disassembly currently requires the AMD driver
  DLL which cannot be distributed. Placing it in the folder with the
  other files will automatically work.
2017-07-05 20:37:48 +01:00
Cody Northrop e69fb7f9e2 cmake: Add option for custom RenderDocCmd.apk location 2017-06-23 02:39:11 -07:00
baldurk 094b9ebf35 Configure build to work with case fallthrough GCC7 warning. Refs #671 2017-06-22 14:20:23 +01:00
baldurk ae50fa99ee Revamp version tagging, remove ugly suffix on git hash. Refs #571
* Tacking -official onto the git hash was a hack only needed on windows,
  and since we want more information it doesn't scale.
* Instead we track anything we need to know about the version in
  separate variables, like whether it's a stable build or a nightly/
  local build. Or if it's built by a downstream distribution then the
  version number for the downstream build.
2017-04-27 19:47:50 +01:00
Peter Gal bb8ae3fb12 Add Android build support for GL ES
Allow building GL ES for Android.
Minimal guards are added to avoid using X11 calls
in case of Android and added support for Android
windowing system.
2017-03-28 03:47:57 -07:00
baldurk 248dbfa4a2 Allow external overriding of auto-fetched git hash identifier in cmake
* This is useful if the build doesn't happen within a git checkout and
  you want to pass in the hash anyway, but it also allows adding
  suffixes like -official etc.
2017-03-10 13:17:46 +00:00
Michael Rennie 5a1ded7386 Moved API-specific GLReplay code to GLPlatform.
ENABLE_GL & ENABLE_GLES can now both be ON without build errors on Linux.
2017-02-22 12:46:28 +00:00
baldurk 9721a4d1a4 Set up icon and version for OS X packages 2017-02-17 20:16:21 +00:00
baldurk c698fe5add install LICENSE.md, README and renderdoc_app.h (as renderdoc.h) 2017-02-10 13:41:55 +00:00
Peter Gal 6b776578b9 Add EGL hooks
Allow capturing with EGL.
2017-02-08 11:17:06 +00:00
baldurk 28e5cd6b56 Pass warning flags into qmake when building 2017-01-03 14:23:59 +00:00
Jake Turner 353bd7c8d1 Disable Vulkan driver by default on Apple 2017-01-02 14:44:07 +00:00
baldurk 8d0915401f Unify feature macro handling 2016-11-07 18:14:49 +01:00
Michael Rennie 149e83ba76 Set same default API level for ANDROID_ABI=armeabi-v7a as for arm64-v8a.
Also switch to 32bit build by default, as almost all content is 32bit.
2016-10-07 15:10:42 +02:00
baldurk 89dc093e84 Define _RELEASE macro on Release CMake targets 2016-09-28 13:54:55 +02:00
baldurk 711860b338 Add sensible defaults for Android to reduce clutter of command line
* The windows command will now be:
  cmake -G "MinGW Makefiles" -DBUILD_ANDROID=On <...>
* The linux command will just be:
  cmake -DBUILD_ANDROID=On <...>
* With the rest of the parameters specified as normal. An optional
  -DANDROID_ABI can be passed to specify the ABI
2016-09-27 14:29:40 +02:00
baldurk c968ab673c Allow cross-compiles on windows via CMake
* We only want to block windows-for-windows builds with CMake, not cross
  compiles for e.g. android from windows.
* We move the fatal error later in the file after the cross-compilation
  has been initialised so we can check if we're really still WIN32.
* This means the early-out on windows is a little late (after some
  autodetection has happened) but that's not the end of the world.
2016-09-27 13:45:32 +02:00
baldurk 90604c6d9c Print custom lines of API support on the version string of renderdoccmd
* An easy way to check what support is compiled into this binary.
2016-08-25 21:07:40 +02:00
baldurk 872fbe017b Make xlib and xcb support optional (but default on) on linux
* Also allow disabling GL a little better by removing the dependency in
  renderdoccmd.
* Disabling them now completely removes all xcb and xlib build
  dependencies. The resulting library/executable is only useful in
  limited situations - e.g. replaying vulkan remotely which doesn't need
  any window system interaction. Or capturing vulkan as well with the
  KHR_display WSI extension which doesn't need any built-time includes
  or libs.
2016-08-23 16:25:21 +02:00
baldurk 09ecb3a6b3 Don't use -Werror in release mode on non-windows builds 2016-08-15 19:56:01 +02:00