summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/CMakeLists.txt5
-rw-r--r--cli/cli_diff.cpp4
-rw-r--r--cli/cli_diff_images.cpp4
-rw-r--r--cli/cli_diff_state.cpp4
4 files changed, 11 insertions, 6 deletions
diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt
index f1b71c1c..ae5fa85c 100644
--- a/cli/CMakeLists.txt
+++ b/cli/CMakeLists.txt
@@ -8,6 +8,11 @@ add_definitions(
-DAPITRACE_SCRIPTS_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/${SCRIPTS_INSTALL_DIR}"
-DAPITRACE_WRAPPERS_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/${WRAPPER_INSTALL_DIR}"
)
+if (WIN32)
+ add_definitions (-DAPITRACE_PYTHON_EXECUTABLE="python")
+else ()
+ add_definitions (-DAPITRACE_PYTHON_EXECUTABLE="${PYTHON_EXECUTABLE}")
+endif ()
add_executable (apitrace
cli_main.cpp
diff --git a/cli/cli_diff.cpp b/cli/cli_diff.cpp
index 6aec76fd..daeccd3e 100644
--- a/cli/cli_diff.cpp
+++ b/cli/cli_diff.cpp
@@ -47,7 +47,7 @@ usage(void)
os::String command = find_command();
char *args[4];
- args[0] = (char *) "python";
+ args[0] = (char *) APITRACE_PYTHON_EXECUTABLE;
args[1] = (char *) command.str();
args[2] = (char *) "--help";
args[3] = NULL;
@@ -65,7 +65,7 @@ command(int argc, char *argv[])
os::String apitracePath = os::getProcessName();
std::vector<const char *> args;
- args.push_back("python");
+ args.push_back(APITRACE_PYTHON_EXECUTABLE);
args.push_back(command.str());
args.push_back("--apitrace");
args.push_back(apitracePath.str());
diff --git a/cli/cli_diff_images.cpp b/cli/cli_diff_images.cpp
index 87678bf0..54523cd3 100644
--- a/cli/cli_diff_images.cpp
+++ b/cli/cli_diff_images.cpp
@@ -47,7 +47,7 @@ usage(void)
os::String command = find_command();
char *args[4];
- args[0] = (char *) "python";
+ args[0] = (char *) APITRACE_PYTHON_EXECUTABLE;
args[1] = (char *) command.str();
args[2] = (char *) "--help";
args[3] = NULL;
@@ -63,7 +63,7 @@ command(int argc, char *argv[])
os::String command = find_command();
std::vector<const char *> args;
- args.push_back("python");
+ args.push_back(APITRACE_PYTHON_EXECUTABLE);
args.push_back(command.str());
for (i = 1; i < argc; i++) {
args.push_back(argv[i]);
diff --git a/cli/cli_diff_state.cpp b/cli/cli_diff_state.cpp
index 952efa98..0488e77f 100644
--- a/cli/cli_diff_state.cpp
+++ b/cli/cli_diff_state.cpp
@@ -47,7 +47,7 @@ usage(void)
os::String command = find_command();
char *args[4];
- args[0] = (char *) "python";
+ args[0] = (char *) APITRACE_PYTHON_EXECUTABLE;
args[1] = (char *) command.str();
args[2] = (char *) "--help";
args[3] = NULL;
@@ -63,7 +63,7 @@ command(int argc, char *argv[])
os::String command = find_command();
std::vector<const char *> args;
- args.push_back("python");
+ args.push_back(APITRACE_PYTHON_EXECUTABLE);
args.push_back(command.str());
for (i = 1; i < argc; i++) {
args.push_back(argv[i]);