]> git.cworth.org Git - apitrace/blobdiff - CMakeLists.txt
Add support for android logging to logcat
[apitrace] / CMakeLists.txt
index 31daa303531a45ea1439913c05050df50b9c6db2..7308fb24bfee07e446c17ad8e24a59d2e567a617 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