hiredis icon indicating copy to clipboard operation
hiredis copied to clipboard

CMake set target property OUTPUT_NAME when building linux static lib.

Open timrulebosch opened this issue 2 years ago • 0 comments

When using the CMakeLists.txt to build a Linux static library the output filename is libhiredis_static.a rather than the normally expected libhiredis.a.

That could be adjusted with the following snippet (at the location indicated below):

IF(UNIX)
    SET_TARGET_PROPERTIES(hiredis_static
        PROPERTIES
            OUTPUT_NAME hiredis
    )
ENDIF()

https://github.com/redis/hiredis/blob/8d31a9290c110b01b18ef5a56b7b6573a67fd65b/CMakeLists.txt#L58

timrulebosch avatar Nov 30 '21 12:11 timrulebosch