Skip to content

Commit

Permalink
Merge pull request #158 from zatherz/master
Browse files Browse the repository at this point in the history
Windows compilation support (fix missing -lws2_32)
  • Loading branch information
romainthomas authored Apr 16, 2018
2 parents 4ef839c + 569dc59 commit 29623d8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ else()
add_library(LIB_LIEF_SHARED SHARED EXCLUDE_FROM_ALL ${LIBLIEF_SOURCE_FILES} ${LIEF_INCLUDE_FILES}) # Shared one
endif()


if(WINDOWS)
target_link_libraries(LIB_LIEF_SHARED ws2_32)
endif()

target_compile_definitions(LIB_LIEF_STATIC PRIVATE -DLIEF_STATIC)
target_compile_definitions(LIB_LIEF_SHARED PRIVATE -DLIEF_EXPORTS)
if (LIEF_SUPPORT_CXX14)
Expand Down

0 comments on commit 29623d8

Please # to comment.