telescope-fzf-native.nvim icon indicating copy to clipboard operation
telescope-fzf-native.nvim copied to clipboard

Building FZF on windows with clang and MSVC toolchain generates libfzf.so

Open bruxisma opened this issue 3 years ago • 2 comments

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.

bruxisma avatar Jul 15 '22 20:07 bruxisma

PR welcome :)

Conni2461 avatar Jul 16 '22 09:07 Conni2461

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!!)

bruxisma avatar Jul 16 '22 10:07 bruxisma