diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2015-08-12 12:48:47 +0200 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2015-08-12 14:11:05 +0200 |
commit | 4d7acb977f9afb54dc15dc7526213e2032a2ea63 (patch) | |
tree | 14c44aed8d04f8f915b0291f904a7ab7d0bae85e /grc | |
parent | de1defc961697ae94e268eacecb99c31bc25e42a (diff) |
grc: have cmake find a xterm executable on UNIX
Diffstat (limited to 'grc')
-rw-r--r-- | grc/CMakeLists.txt | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt index 3714401bbb..859b9e9045 100644 --- a/grc/CMakeLists.txt +++ b/grc/CMakeLists.txt @@ -72,13 +72,16 @@ if(CMAKE_INSTALL_PREFIX STREQUAL "/usr") set(blocksdir ${blocksdir}:/usr/local/${GRC_BLOCKS_DIR}) endif(CMAKE_INSTALL_PREFIX STREQUAL "/usr") -if (APPLE) - set(GRC_XTERM_EXE "xterm") -elseif(CYGWIN) - set(GRC_XTERM_EXE "xterm") -elseif(UNIX) - set(GRC_XTERM_EXE "x-terminal-emulator") -else() +if(UNIX) + find_program(GRC_XTERM_EXE + NAMES xterminal-emulator gnome-terminal konsole xterm + HINTS ENV PATH + DOC "graphical terminal emulator used in GRC's no-gui-mode" + ) + if(NOT GRC_XTERM_EXE) + set(GRC_XTERM_EXE "") + endif() +else() # APPLE CYGWIN set(GRC_XTERM_EXE "xterm") endif() |