From 8fea935dc9fa8a60edb04d2ff1299d835a24bd81 Mon Sep 17 00:00:00 2001 From: Martin Pecka Date: Sun, 15 Sep 2024 02:26:58 +0200 Subject: [PATCH] Fixed cmd on Windows Signed-off-by: Martin Pecka --- src/cmd/CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/cmd/CMakeLists.txt b/src/cmd/CMakeLists.txt index 833f2856..d6a1ea74 100644 --- a/src/cmd/CMakeLists.txt +++ b/src/cmd/CMakeLists.txt @@ -31,7 +31,15 @@ set(cmd_script_configured "${CMAKE_CURRENT_BINARY_DIR}/${CMD_NAME}${PROJECT_VERS # Set the library_location variable to the relative path to the library file # within the install directory structure. -set(library_location "../../../${CMAKE_INSTALL_LIBDIR}/$") +if (MSVC) + set(library_location_prefix "${CMAKE_INSTALL_BINDIR}") +else() + set(library_location_prefix "${CMAKE_INSTALL_LIBDIR}") +endif() + +# Set the library_location variable to the relative path to the library file +# within the install directory structure. +set(library_location "../../../${library_location_prefix}/$") configure_file( "${CMD_NAME}.rb.in"