Files
CMake/Tests/FindRuby/Test/CMakeLists.txt
Brad King f52f496138 FindRuby: Provide Ruby_LIBRARIES result variable
The `cmake-developer(7)` manual documents that a plural non-cached
name should be used for results.
2020-03-16 14:05:26 -04:00

15 lines
426 B
CMake

cmake_minimum_required(VERSION 3.17)
project(TestRuby LANGUAGES C)
include(CTest)
find_package(Ruby 1.9.9 REQUIRED)
if (NOT Ruby_FOUND)
message (FATAL_ERROR "Failed to find Ruby >=1.9.9")
endif()
add_executable(ruby_version ruby_version.c)
target_include_directories(ruby_version PRIVATE ${Ruby_INCLUDE_DIRS})
target_link_libraries(ruby_version PRIVATE ${Ruby_LIBRARIES})
add_test(NAME ruby_version COMMAND ruby_version)