]> git.cworth.org Git - apitrace/blobdiff - cli/CMakeLists.txt
Rename trim::CallSet to trace::FastCallSet
[apitrace] / cli / CMakeLists.txt
index a01d3aed11e72b0da42276c3552e8935b525787c..689374dc5333ade934d45ea2a398e57d7182cec5 100644 (file)
@@ -1,3 +1,14 @@
+# Expose the binary/install directories to source
+#
+# TODO: Use the same directory layout, for both build and install directories,
+# so that binaries can find each other using just relative paths.
+#
+add_definitions(
+    -DAPITRACE_PROGRAMS_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/bin"
+    -DAPITRACE_SCRIPTS_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/${SCRIPTS_INSTALL_DIR}"
+    -DAPITRACE_WRAPPERS_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/${WRAPPER_INSTALL_DIR}"
+)
+
 add_executable (apitrace
     cli_main.cpp
     cli_diff.cpp
@@ -12,6 +23,7 @@ add_executable (apitrace
     cli_trace.cpp
     cli_trim.cpp
     cli_resources.cpp
+    trace_analyzer.cpp
 )
 
 target_link_libraries (apitrace
@@ -21,4 +33,11 @@ target_link_libraries (apitrace
     ${GETOPT_LIBRARIES}
 )
 
+if (NOT CMAKE_CROSSCOMPILING)
+    set_target_properties (apitrace PROPERTIES
+        # On debug builds tell where the source is so that scripts can be found
+        COMPILE_DEFINITIONS_DEBUG APITRACE_SOURCE_DIR="${CMAKE_SOURCE_DIR}"
+    )
+endif ()
+
 install (TARGETS apitrace RUNTIME DESTINATION bin)