Add dns c library
This commit is contained in:
parent
9d57deb35b
commit
f1aa29634b
@ -44,6 +44,7 @@ CMAKE_DEPENDENT_OPTION(USE_SYSTEM_SQUISH "Use system Squish library instead of t
|
|||||||
"NOT SERVER_ONLY" OFF)
|
"NOT SERVER_ONLY" OFF)
|
||||||
CMAKE_DEPENDENT_OPTION(USE_WIIUSE "Support for wiimote input devices" ON
|
CMAKE_DEPENDENT_OPTION(USE_WIIUSE "Support for wiimote input devices" ON
|
||||||
"NOT SERVER_ONLY;NOT CYGWIN;NOT USE_SWITCH" OFF)
|
"NOT SERVER_ONLY;NOT CYGWIN;NOT USE_SWITCH" OFF)
|
||||||
|
CMAKE_DEPENDENT_OPTION(USE_DNS_C "Build bundled dns resolver" OFF "NOT CYGWIN;NOT USE_SWITCH" ON)
|
||||||
|
|
||||||
if(APPLE AND NOT IOS)
|
if(APPLE AND NOT IOS)
|
||||||
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm")
|
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm")
|
||||||
@ -189,12 +190,19 @@ endif()
|
|||||||
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/bullet")
|
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/bullet")
|
||||||
include_directories(BEFORE "${PROJECT_SOURCE_DIR}/lib/bullet/src")
|
include_directories(BEFORE "${PROJECT_SOURCE_DIR}/lib/bullet/src")
|
||||||
|
|
||||||
if(WIN32 OR CMAKE_SYSTEM_NAME MATCHES "BSD" OR CMAKE_SYSTEM_NAME MATCHES "DragonFly" OR USE_SWITCH)
|
# Build the DNS C library
|
||||||
set(LIBRESOLV_LIBRARY)
|
if(USE_DNS_C)
|
||||||
elseif (HAIKU)
|
add_definitions(-DDNS_C)
|
||||||
find_library(LIBRESOLV_LIBRARY NAMES network socket)
|
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/dnsc")
|
||||||
|
include_directories(BEFORE "${PROJECT_SOURCE_DIR}/lib/dnsc")
|
||||||
else()
|
else()
|
||||||
find_library(LIBRESOLV_LIBRARY NAMES resolv libresolv)
|
if(WIN32 OR CMAKE_SYSTEM_NAME MATCHES "BSD" OR CMAKE_SYSTEM_NAME MATCHES "DragonFly" OR USE_SWITCH)
|
||||||
|
set(LIBRESOLV_LIBRARY)
|
||||||
|
elseif (HAIKU)
|
||||||
|
find_library(LIBRESOLV_LIBRARY NAMES network socket)
|
||||||
|
else()
|
||||||
|
find_library(LIBRESOLV_LIBRARY NAMES resolv libresolv)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Find system ENet library or build it if missing
|
# Find system ENet library or build it if missing
|
||||||
@ -611,7 +619,6 @@ target_link_libraries(supertuxkart
|
|||||||
stkirrlicht
|
stkirrlicht
|
||||||
${Angelscript_LIBRARIES}
|
${Angelscript_LIBRARIES}
|
||||||
${CURL_LIBRARIES}
|
${CURL_LIBRARIES}
|
||||||
${LIBRESOLV_LIBRARY}
|
|
||||||
${MCPP_LIBRARY}
|
${MCPP_LIBRARY}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -638,6 +645,12 @@ if (USE_SWITCH)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (USE_DNS_C)
|
||||||
|
target_link_libraries(supertuxkart dnsc)
|
||||||
|
else()
|
||||||
|
target_link_libraries(supertuxkart ${LIBRESOLV_LIBRARY})
|
||||||
|
endif()
|
||||||
|
|
||||||
if (USE_SQLITE3)
|
if (USE_SQLITE3)
|
||||||
target_link_libraries(supertuxkart ${SQLITE3_LIBRARY})
|
target_link_libraries(supertuxkart ${SQLITE3_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
1
lib/dnsc/CMakeLists.txt
Normal file
1
lib/dnsc/CMakeLists.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
add_library(dnsc STATIC dns.c)
|
19
lib/dnsc/LICENSE
Normal file
19
lib/dnsc/LICENSE
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Copyright (c) 2008-2015 William Ahern <william@25thandClement.com>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to
|
||||||
|
deal in the Software without restriction, including without limitation the
|
||||||
|
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
IN THE SOFTWARE.
|
10460
lib/dnsc/dns.c
Normal file
10460
lib/dnsc/dns.c
Normal file
File diff suppressed because it is too large
Load Diff
1227
lib/dnsc/dns.h
Normal file
1227
lib/dnsc/dns.h
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user