summaryrefslogtreecommitdiff
blob: 91867affca26e33ac75561c8d4ce47941fd1be1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Allow building of just glxtrace library for ebuilds without GUI tools.

Updated from 5.0 version of patch to apply against 7.1.

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,6 +44,8 @@
 
 option (ENABLE_FRAME_POINTER "Disable frame pointer omission" ON)
 
+option (BUILD_LIB_ONLY "Build the glxtrace library only" OFF)
+
 # Proprietary Linux games often ship their own libraries (zlib, libstdc++,
 # etc.) in order to ship a single set of binaries across multiple
 # distributions.  Given that apitrace wrapper modules will be loaded into those
--- a/retrace/CMakeLists.txt
+++ b/retrace/CMakeLists.txt
@@ -12,6 +12,8 @@
 
 add_definitions (-DRETRACE)
 
+if (NOT BUILD_LIB_ONLY)
+
 add_custom_command (
     OUTPUT glretrace_gl.cpp
     COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glretrace.py > ${CMAKE_CURRENT_BINARY_DIR}/glretrace_gl.cpp
@@ -368,3 +370,5 @@
     install (TARGETS d3dretrace RUNTIME DESTINATION bin)
     install_pdb (d3dretrace DESTINATION bin)
 endif ()
+
+endif (NOT BUILD_LIB_ONLY)