message(SEND_ERROR"The guild executable was not found, but is required. Please set GUILD_EXECUTABLE.")
endif()
message(STATUS"Using guile-3.0.x")
find_program(GUILE_EXECUTABLENAMESguile3.0guile)
elseif(GUILE22_FOUND)#foundguile-2.2
add_definitions(-DHAVE_GUILE22)
set(HAVE_GUILE2TRUE)
set(GUILE_EFFECTIVE_VERSION2.2)
set(GUILE_INCLUDE_DIRS${GUILE22_INCLUDE_DIRS})
set(GUILE_LDFLAGS${GUILE22_LDFLAGS})
find_program(GUILD_EXECUTABLENAMESguild2.2guild)
if(NOTGUILD_EXECUTABLE)
message(SEND_ERROR"The guild executable was not found, but is required. Please set GUILD_EXECUTABLE.")
endif()
message(STATUS"Using guile-2.2.x")
find_program(GUILE_EXECUTABLENAMESguile2.2guile)
else()
pkg_check_modules(GUILE2guile-2.0>=2.0.9QUIET)
if(GUILE2_FOUND)#foundguile-2.0
add_definitions(-DHAVE_GUILE20)
set(HAVE_GUILE2TRUE)
set(GUILE_EFFECTIVE_VERSION2.0)
set(GUILE_INCLUDE_DIRS${GUILE2_INCLUDE_DIRS})
set(GUILE_LDFLAGS${GUILE2_LDFLAGS})
find_program(GUILD_EXECUTABLENAMESguild2.0guild)
if(NOTGUILD_EXECUTABLE)
message(SEND_ERROR"The guild executable was not found, but is required. Please set GUILD_EXECUTABLE.")
endif()
message(STATUS"Using guile-2.0.x")
find_program(GUILE_EXECUTABLENAMESguile2.0guile)
else()
message(FATAL_ERROR"Neither guile 2.2 nor guile 2.0 were found GnuCash can't run without one of them. Ensure that one is installed and can be found with pkg-config.")
elseif(GUILE2_FOUND)#foundguile-2.0
add_definitions(-DHAVE_GUILE20)
set(HAVE_GUILE2TRUE)
set(GUILE_EFFECTIVE_VERSION2.0)
set(GUILE_INCLUDE_DIRS${GUILE2_INCLUDE_DIRS})
set(GUILE_LDFLAGS${GUILE2_LDFLAGS})
find_program(GUILD_EXECUTABLENAMESguild2.0guild)
if(NOTGUILD_EXECUTABLE)
message(SEND_ERROR"The guild executable was not found, but is required. Please set GUILD_EXECUTABLE.")
endif()
message(STATUS"Using guile-2.0.x")
find_program(GUILE_EXECUTABLENAMESguile2.0guile)
else()
message(FATAL_ERROR"Neither guile 3.0, guile 2.2, nor guile 2.0 were found GnuCash can't run without one of them. Ensure that one is installed and can be found with pkg-config.")