2016-09-25 16:19:39 -04:00
|
|
|
#############################################################################
|
|
|
|
# Name: build/cmake/lib/net/CMakeLists.txt
|
|
|
|
# Purpose: CMake file for net library
|
|
|
|
# Author: Tobias Taschner
|
|
|
|
# Created: 2016-09-21
|
|
|
|
# Copyright: (c) 2016 wxWidgets development team
|
|
|
|
# Licence: wxWindows licence
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
include(../../source_groups.cmake)
|
|
|
|
|
|
|
|
wx_append_sources(NET_FILES NET_CMN)
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
wx_append_sources(NET_FILES NET_WIN32)
|
|
|
|
elseif(APPLE)
|
|
|
|
wx_append_sources(NET_FILES NET_OSX)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(UNIX AND NOT WIN32)
|
|
|
|
wx_append_sources(NET_FILES NET_UNIX)
|
|
|
|
endif()
|
|
|
|
|
2020-05-17 13:41:44 -04:00
|
|
|
wx_add_library(wxnet IS_BASE ${NET_FILES})
|
2016-09-25 16:19:39 -04:00
|
|
|
|
|
|
|
if(WIN32)
|
2020-05-17 13:41:44 -04:00
|
|
|
wx_lib_link_libraries(wxnet PRIVATE ws2_32)
|
2018-10-20 13:21:35 -04:00
|
|
|
|
2018-10-25 07:08:51 -04:00
|
|
|
if(wxUSE_WEBREQUEST_WINHTTP)
|
2021-06-28 10:04:41 -04:00
|
|
|
wx_lib_link_libraries(wxnet PRIVATE winhttp)
|
2018-10-20 13:21:35 -04:00
|
|
|
endif()
|
2016-09-25 16:19:39 -04:00
|
|
|
endif()
|
|
|
|
|
2018-10-31 08:42:56 -04:00
|
|
|
if (wxUSE_WEBREQUEST_CURL)
|
2020-12-12 11:44:45 -05:00
|
|
|
target_include_directories(wxnet PRIVATE ${CURL_INCLUDE_DIRS})
|
|
|
|
wx_lib_link_libraries(wxnet PRIVATE ${CURL_LIBRARIES})
|
2018-10-31 08:42:56 -04:00
|
|
|
endif()
|
|
|
|
|
2020-05-17 13:41:44 -04:00
|
|
|
wx_finalize_lib(wxnet)
|