Closed
Description
XCode command line tools comes with bundled zlib, which has .tld extension. this cmake file sets static lib usage for zlib, which would make static library preferred, although FindZLIB.cmake from cmake installation uses this variable to set up static linking exclusively. This results in zlib being not found, as it only searches for .a files.
# Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
if(ZLIB_USE_STATIC_LIBS)
if(WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
else()
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
endif()
endif()
Similar example for protobuf.
# Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
if( Protobuf_USE_STATIC_LIBS )
set( _protobuf_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
if(WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
else()
set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
endif()
endif()
build-log-debug-find.txt
build-log-trace.txt
Is setting static only linking of above libraries a requirement? Definition of USERVER_USE_STATIC_LIBS suggests that those settings are unwanted.
Metadata
Metadata
Assignees
Labels
No labels