Fix FIND_PROGRAM invocation for guile

This commit is contained in:
Geert Janssens 2017-08-31 16:15:19 +02:00
parent 64309e4e88
commit e732ff9432

View File

@ -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)