020-cmake-fix-tmp-session-search.patch 872 B

123456789101112131415161718192021222324252627
  1. --- a/CMakeLists.txt
  2. +++ b/CMakeLists.txt
  3. @@ -471,14 +471,16 @@ endif()
  4. #### Find socket directories
  5. if(UNIX)
  6. - if(NOT $ENV{TMPDIR} STREQUAL "")
  7. - set(DBUS_SESSION_SOCKET_DIR $ENV{TMPDIR})
  8. - elseif(NOT $ENV{TEMP} STREQUAL "")
  9. - set(DBUS_SESSION_SOCKET_DIR $ENV{TEMP})
  10. - elseif(NOT $ENV{TMP} STREQUAL "")
  11. - set(DBUS_SESSION_SOCKET_DIR $ENV{TMP})
  12. - else()
  13. - set(DBUS_SESSION_SOCKET_DIR /tmp)
  14. + if(NOT DEFINED DBUS_SESSION_SOCKET_DIR)
  15. + if(NOT $ENV{TMPDIR} STREQUAL "")
  16. + set(DBUS_SESSION_SOCKET_DIR $ENV{TMPDIR})
  17. + elseif(NOT $ENV{TEMP} STREQUAL "")
  18. + set(DBUS_SESSION_SOCKET_DIR $ENV{TEMP})
  19. + elseif(NOT $ENV{TMP} STREQUAL "")
  20. + set(DBUS_SESSION_SOCKET_DIR $ENV{TMP})
  21. + else()
  22. + set(DBUS_SESSION_SOCKET_DIR /tmp)
  23. + endif()
  24. endif()
  25. endif()