]> git.cworth.org Git - apitrace/blobdiff - CMakeLists.txt
Split image dumping to a separate source file.
[apitrace] / CMakeLists.txt
index 31daa303531a45ea1439913c05050df50b9c6db2..d42aa1e05900e5701372cefd68bbd1b2b50918da 100755 (executable)
@@ -29,7 +29,15 @@ set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
 
 set (CMAKE_USE_PYTHON_VERSION 2.7 2.6)
 
-find_package (PythonInterp REQUIRED)
+if (ANDROID)
+    set (ENABLE_GUI false)
+else ()
+    macro (find_host_package)
+        find_package (${ARGN})
+    endmacro()
+endif ()
+
+find_host_package (PythonInterp REQUIRED)
 find_package (Threads)
 
 if (ENABLE_GUI)
@@ -169,6 +177,10 @@ if (MSVC)
     set (GETOPT_LIBRARIES getopt_bundled)
 endif ()
 
+if (WIN32)
+    add_subdirectory (thirdparty/less)
+endif ()
+
 # The Qt website provides binaries for Windows and MacOSX, and they are
 # automatically found by cmake without any manual intervention.  The situation
 # for QJSON is substantially different: there are no binaries for QJSON
@@ -282,6 +294,10 @@ set_target_properties (common PROPERTIES
     COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}"
 )
 
+if (ANDROID)
+    target_link_libraries (common log)
+endif ()
+
 
 ##############################################################################
 # API tracers
@@ -532,8 +548,8 @@ add_custom_command (
 
 add_custom_command (
     OUTPUT glstate_params.cpp
-    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glstate.py > ${CMAKE_CURRENT_BINARY_DIR}/glstate_params.cpp
-    DEPENDS glstate.py specs/glparams.py specs/gltypes.py specs/stdapi.py
+    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glstate_params.py > ${CMAKE_CURRENT_BINARY_DIR}/glstate_params.cpp
+    DEPENDS glstate_params.py specs/glparams.py specs/gltypes.py specs/stdapi.py
 )
 
 set (retrace_sources
@@ -544,7 +560,9 @@ set (retrace_sources
     glretrace_egl.cpp
     glretrace_main.cpp
     glstate.cpp
+    glstate_images.cpp
     glstate_params.cpp
+    glstate_shaders.cpp
     retrace.cpp
     retrace_stdc.cpp
     glws.cpp