Make sure that MacPorts's Guile 3.0 is used, with the customized executable names. --- CMakeLists.txt +++ CMakeLists.txt @@ -94,9 +94,11 @@ if(NOT MSVC) find_package(Boost REQUIRED) find_package(PkgConfig REQUIRED) - pkg_check_modules(GUILE guile-2.2>=2.2.1) - if (NOT(GUILE_FOUND)) - pkg_check_modules(GUILE guile-3.0>=3.0.0) + pkg_check_modules(GUILE guile-3.0>=3.0.0) + + if (GUILE_FOUND) + pkg_get_variable(GUILE_EXEC guile-3.0 guile) + pkg_get_variable(GUILD_EXEC guile-3.0 guild) endif() pkg_check_modules(EIGEN REQUIRED eigen3>=3.2.92) --- libfive/bind/guile/CMakeLists.txt +++ libfive/bind/guile/CMakeLists.txt @@ -28,10 +28,10 @@ foreach(SRC ${SRCS}) # # Then, copy the file from Guile's compilation cache to the build directory execute_process( - COMMAND guile -c "(use-modules (system base compile))(format #t \"~A\" (compiled-file-name \"${FULL_SRC}\"))" + COMMAND ${GUILE_EXEC} -c "(use-modules (system base compile))(format #t \"~A\" (compiled-file-name \"${FULL_SRC}\"))" OUTPUT_VARIABLE CCACHE_FILE) add_custom_command(OUTPUT ${OUT} - COMMAND ${CMAKE_COMMAND} -E env LIBFIVE_FRAMEWORK_DIR=$/ LIBFIVE_STDLIB_DIR=$/ guild compile -L${CMAKE_CURRENT_SOURCE_DIR} ${FULL_SRC} + COMMAND ${CMAKE_COMMAND} -E env LIBFIVE_FRAMEWORK_DIR=$/ LIBFIVE_STDLIB_DIR=$/ ${GUILD_EXEC} compile -L${CMAKE_CURRENT_SOURCE_DIR} ${FULL_SRC} COMMAND ${CMAKE_COMMAND} -E copy ${CCACHE_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${OUT} WORKING_DIRECTORY ${PROJECT_BINARY_DIR} DEPENDS ${FULL_SRC} libfive libfive-stdlib) @@ -45,7 +45,7 @@ if(UNIX) # Find the installation directory for compiled files if (NOT DEFINED GUILE_CCACHE_DIR) execute_process( - COMMAND guile -c "(format #t \"~A\" (%site-ccache-dir))" + COMMAND ${GUILE_EXEC} -c "(format #t \"~A\" (%site-ccache-dir))" OUTPUT_VARIABLE GUILE_CCACHE_DIR) endif()