telescope-fzf-native.nvim
telescope-fzf-native.nvim copied to clipboard
Building FZF on windows with clang and MSVC toolchain generates libfzf.so
To recreate, install cmake, ninja, MSVC Build tools, Clang 14 from llvm.org and run the build. You'll see that it generates a .so instead of a .dll
Suggestion for a fix is to replace the set(CMAKE_SHARED_LIBRARY_SUFFIX .so) call with a new line for set_target_properties
set_target_properties(${PROJECT_NAME} PROPERTIES
PREFIX lib
# This line specifically
SUFFIX $<$<NOT:$<STREQUAL:${CMAKE_SYSTEM_NAME},Windows>>.so>
C_STANDARD 99
WINDOWS_EXPORT_ALL_SYMBOLS ON
)
This adds a generator expression that will only set .so (during generation time) if the targeted system is not Windows.
PR welcome :)
I've opened a PR, and fixed a few other issues as well. (Also thanks for making this project. Saves me a ton of time!!)