Minor changes.

GitOrigin-RevId: d6175b96bf764800bd20d3c9eef789ba4c1fcbf5
This commit is contained in:
levlam 2020-07-26 15:55:33 +03:00
parent f4dbfd88fc
commit be38eb5b24
2 changed files with 3 additions and 2 deletions

View File

@ -301,6 +301,7 @@ set(TDUTILS_TEST_SOURCE
#LIBRARIES
add_library(tdutils STATIC ${TDUTILS_SOURCE})
if (WIN32)
# find_library for system libraries doesn't work for UWP builds
# find_library(WS2_32_LIBRARY ws2_32)
# find_library(MSWSOCK_LIBRARY Mswsock)
# target_link_libraries(tdutils PRIVATE ${WS2_32_LIBRARY} ${MSWSOCK_LIBRARY})

View File

@ -42,7 +42,7 @@ if (NOT CMAKE_CROSSCOMPILING)
DEPENDS generate_mime_types_gperf mime_types.txt
)
if (WIN32)
if (CMAKE_HOST_WIN32)
set(MIME_TYPE_TO_EXTENSION_CMD ${GPERF_EXECUTABLE} -m100 --output-file=auto/mime_type_to_extension.cpp auto/mime_type_to_extension.gperf)
else()
set(MIME_TYPE_TO_EXTENSION_CMD ${GPERF_EXECUTABLE} -m100 auto/mime_type_to_extension.gperf | grep -v __gnu_inline__ > auto/mime_type_to_extension.cpp)
@ -54,7 +54,7 @@ if (NOT CMAKE_CROSSCOMPILING)
DEPENDS auto/mime_type_to_extension.gperf
)
if (WIN32)
if (CMAKE_HOST_WIN32)
set(EXTENSION_TO_MIME_TYPE_CMD ${GPERF_EXECUTABLE} -m100 --output-file=auto/extension_to_mime_type.cpp auto/extension_to_mime_type.gperf)
else()
set(EXTENSION_TO_MIME_TYPE_CMD ${GPERF_EXECUTABLE} -m100 auto/extension_to_mime_type.gperf | grep -v __gnu_inline__ > auto/extension_to_mime_type.cpp)