diff --git a/CMakeLists.txt b/CMakeLists.txt index c5ead6f7e9..5457eb631b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -261,11 +261,12 @@ IF (GUILE2_FOUND) # found guile-2.0 SET(GUILE_INCLUDE_DIRS ${GUILE2_INCLUDE_DIRS}) SET(GUILE_LDFLAGS ${GUILE2_LDFLAGS}) - FIND_PROGRAM (GUILD_EXECUTABLE guild2.0 guild) + FIND_PROGRAM (GUILD_EXECUTABLE NAMES guild2.0 guild) IF (NOT GUILD_EXECUTABLE) MESSAGE (SEND_ERROR "The guild executable was not found, but is required. Please set GUILD_EXECUTABLE.") ENDIF (NOT GUILD_EXECUTABLE) MESSAGE(STATUS "Using guile-2.0.x") + FIND_PROGRAM (GUILE_EXECUTABLE NAMES guile2.0 guile) ELSE() # look for guile 1.8 GNC_PKG_CHECK_MODULES (GUILE1 guile-1.8>=1.8.8 QUIET) @@ -278,9 +279,9 @@ ELSE() SET(GUILE_INCLUDE_DIRS ${GUILE1_INCLUDE_DIRS}) SET(GUILE_LDFLAGS ${GUILE1_LDFLAGS}) MESSAGE(STATUS "Using guile-1.8.x") + FIND_PROGRAM (GUILE_EXECUTABLE NAMES guile1.8 guile) ENDIF() -FIND_PROGRAM (GUILE_EXECUTABLE guile2.0 guile) IF (NOT GUILE_EXECUTABLE) MESSAGE (SEND_ERROR "The guile executable was not found, but is required. Please set GUILE_EXECUTABLE.") ENDIF (NOT GUILE_EXECUTABLE)