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"