aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAvatar Marvin Schmidt <marv@exherbo.org> 2020-10-25 18:09:45 +0100
committerAvatar Marvin Schmidt <marv@exherbo.org> 2022-02-09 14:05:31 +0100
commitcf94a7c927e4bad1f9c686630df87031f2df469f (patch)
tree3dad3d0ea02b601fc8fc95121830d57d42ccbd2f /CMakeLists.txt
parentcb558ff33f03c3abc92774154d17edc4a0ca20fd (diff)
downloadpaludis-cf94a7c927e4bad1f9c686630df87031f2df469f.tar.gz
paludis-cf94a7c927e4bad1f9c686630df87031f2df469f.tar.xz
build: Only set ruby install dir if ruby is enabled
There's no point in setting PALUDIS_RUBY_INSTALL_DIR if the Ruby bindings are disabled and since it's cached it causes problems when changing `ENABLE_RUBY` from `OFF` to `ON` because the cached empty value is used This brings the code for the Ruby bindings in sync with code for the Python bindings
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 3 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 97345bf52..2eb24fd9a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -352,16 +352,15 @@ endif()
if(ENABLE_RUBY)
list(FIND RUBY_SUPPORTED_VERSIONS "${RUBY_VERSION}" _ruby_version_index)
-
if(_ruby_version_index EQUAL -1)
message(SEND_ERROR "invalid ruby version specified (${RUBY_VERSION})")
endif()
find_package(Ruby ${RUBY_VERSION} REQUIRED)
-endif()
-set(PALUDIS_RUBY_INSTALL_DIR "${RUBY_SITEARCH_DIR}" CACHE PATH
- "ruby installation directory")
+ set(PALUDIS_RUBY_INSTALL_DIR "${RUBY_SITEARCH_DIR}" CACHE PATH
+ "ruby installation directory")
+endif()
if(ENABLE_RUBY_DOCS)
execute_process(COMMAND