From 9e357a5a4f11e5aeb06689413c8599a0625db244 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Sun, 15 May 2016 01:46:25 +0200 Subject: [PATCH] Fix issue missing temporary dir on cross compiling for windows with cmake. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99586 --- cmake/CMakeLists.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index dc1675f..c1da993 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -441,11 +441,15 @@ endif (MSVC_IDE) set (DBUS_SESSION_SOCKET_DIR $ENV{TMP}) else (NOT $ENV{TMP} STREQUAL "") if (WIN32) - #Should never happen, both TMP and TEMP seem always set on Windows - message(FATAL_ERROR "Could not determine a usable temporary directory") - else(WIN32) + if (CMAKE_CROSSCOMPILING) + set (DBUS_SESSION_SOCKET_DIR /tmp) + else() + #Should never happen, both TMP and TEMP seem always set on Windows + message(FATAL_ERROR "Could not determine a usable temporary directory") + endif() + else() set (DBUS_SESSION_SOCKET_DIR /tmp) - endif(WIN32) + endif() endif (NOT $ENV{TMP} STREQUAL "") endif (NOT $ENV{TEMP} STREQUAL "") endif (NOT $ENV{TMPDIR} STREQUAL "") -- 2.6.6