Skip to content

Commit

Permalink
included fix for mingw/windows builds (added ws2_32 lib)
Browse files Browse the repository at this point in the history
  • Loading branch information
rondiplomatico committed Aug 28, 2015
1 parent 8694591 commit c1958bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -513,13 +513,17 @@ ADD_LIBRARY( ${LIBRARY_TARGET_NAME} ${XML2_SRCS} ${PUBLIC_HDRS} ${PRIVATE_HDRS}
target_compile_definitions(${LIBRARY_TARGET_NAME} PUBLIC LIBXML_XPATH_ENABLED)
if (WIN32)
target_compile_definitions(${LIBRARY_TARGET_NAME} PUBLIC _WINDOWS)
# Fix for nanoftp/nanohttp
if (MINGW)
target_link_libraries(${LIBRARY_TARGET_NAME} PUBLIC ws2_32)
endif()
endif()
if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(${LIBRARY_TARGET_NAME} PUBLIC LIBXML_STATIC)
endif()

IF( ZLIB_FOUND )
TARGET_LINK_LIBRARIES( ${LIBRARY_TARGET_NAME} zlib)
TARGET_LINK_LIBRARIES( ${LIBRARY_TARGET_NAME} PUBLIC zlib)
target_compile_definitions(${LIBRARY_TARGET_NAME} PRIVATE HAVE_ZLIB_H)
ENDIF()

Expand Down

0 comments on commit c1958bf

Please sign in to comment.