Try to estimate needed ruby paths on macOS
@@ -251,7 +251,13 @@ jobs:
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
- run: CXXFLAGS=-Wno-reserved-user-defined-literal cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DTINYSPLINE_ENABLE_RUBY=True
+ run: |
+ RUBY_EXECUTABLE=$(ruby -e "puts(RbConfig.ruby)")
+ INCLUDE_DIR=$(ruby -e "puts(RbConfig::CONFIG['rubyhdrdir'])")
+ CONFIG_DIR=$(ruby -e "puts(RbConfig::CONFIG['rubyarchhdrdir'])")
+ LIBRARY=$(ruby -e "puts(RbConfig::CONFIG['libdir'])")
+ LIBRARY=$LIBRARY/$(ruby -e "puts(RbConfig::CONFIG['LIBRUBY_SONAME'])")
+ CXXFLAGS=-Wno-reserved-user-defined-literal cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DTINYSPLINE_ENABLE_RUBY=True -DRuby_EXECUTABLE="$RUBY_EXECUTABLE" -DRuby_INCLUDE_DIR="$INCLUDE_DIR" -DRuby_CONFIG_INCLUDE_DIR="$CONFIG_DIR" -DRuby_LIBRARY="$LIBRARY"
- name: Build
working-directory: ${{runner.workspace}}/build
