Skip to content

Commit

Permalink
Link to lowercase libraries when building using MinGW.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 0c9c122ed16a4d9ebb0c5ea44301cd4dcd4f9d60
  • Loading branch information
levlam committed Jul 26, 2020
1 parent be38eb5 commit 9ff056e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion tdnet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ endif()
target_link_libraries(tdnet PRIVATE ${OPENSSL_CRYPTO_LIBRARY})

if (WIN32)
target_link_libraries(tdnet PRIVATE Crypt32)
if (MINGW)
target_link_libraries(tdnet PRIVATE crypt32)
else()
target_link_libraries(tdnet PRIVATE Crypt32)
endif()
endif()

install(TARGETS tdnet EXPORT TdTargets
Expand Down
6 changes: 5 additions & 1 deletion tdutils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,11 @@ if (WIN32)
# find_library(WS2_32_LIBRARY ws2_32)
# find_library(MSWSOCK_LIBRARY Mswsock)
# target_link_libraries(tdutils PRIVATE ${WS2_32_LIBRARY} ${MSWSOCK_LIBRARY})
target_link_libraries(tdutils PRIVATE ws2_32 Mswsock Normaliz psapi)
if (MINGW)
target_link_libraries(tdutils PRIVATE ws2_32 mswsock normaliz psapi)
else()
target_link_libraries(tdutils PRIVATE ws2_32 Mswsock Normaliz psapi)
endif()
endif()
if (NOT CMAKE_CROSSCOMPILING AND TDUTILS_MIME_TYPE)
add_dependencies(tdutils tdmime_auto)
Expand Down

0 comments on commit 9ff056e

Please sign in to comment.