aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorArne Morten Kvarving <spiff@kodi.tv>2018-02-12 10:58:51 +0100
committernotspiff <spiff@kodi.tv>2018-02-13 10:50:17 +0100
commitfefa9f3ba5654015776b73ce656bd893993706ee (patch)
treed24e55e5fc02c1958b881e20dd10e3d4796fbce5 /lib
parent705bfcd67ff27cc5778c477919590418f9139d5b (diff)
fixed: build of neptune on freebsd
Diffstat (limited to 'lib')
-rw-r--r--lib/libUPnP/CMakeLists.txt9
-rw-r--r--lib/libUPnP/patches/0002-platinum-add-custom-CMakeLists.txt.patch15
2 files changed, 21 insertions, 3 deletions
diff --git a/lib/libUPnP/CMakeLists.txt b/lib/libUPnP/CMakeLists.txt
index b7ca9b0c3b..5aa41aa649 100644
--- a/lib/libUPnP/CMakeLists.txt
+++ b/lib/libUPnP/CMakeLists.txt
@@ -96,9 +96,18 @@ else()
Neptune/Source/System/Win32/NptWin32Time.cpp)
endif()
+if(CORE_SYSTEM_NAME STREQUAL "freebsd")
+ list(APPEND SOURCES Neptune/Source/System/Bsd/NptBsdResolver.cpp
+ Neptune/Source/System/Bsd/NptBsdSockets.cpp)
+endif()
+
add_library(upnp STATIC ${SOURCES} ${HEADERS})
target_compile_definitions(upnp PUBLIC -DNPT_CONFIG_ENABLE_LOGGING)
+if(CORE_SYSTEM_NAME STREQUAL "freebsd")
+ target_compile_definitions(upnp PUBLIC -DNPT_CONFIG_HAVE_GETADDRINFO)
+endif()
+
target_include_directories(upnp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
Platinum/Source/Core
Platinum/Source/Platinum
diff --git a/lib/libUPnP/patches/0002-platinum-add-custom-CMakeLists.txt.patch b/lib/libUPnP/patches/0002-platinum-add-custom-CMakeLists.txt.patch
index 22336eb8e7..c45643e37b 100644
--- a/lib/libUPnP/patches/0002-platinum-add-custom-CMakeLists.txt.patch
+++ b/lib/libUPnP/patches/0002-platinum-add-custom-CMakeLists.txt.patch
@@ -1,6 +1,6 @@
---- /dev/null
-+++ b/lib/libUPnP/CMakeLists.txt
-@@ -0,0 +1,120 @@
+--- /dev/null 2018-02-07 16:00:11.607220700 +0100
++++ b/lib/libUPnP/CMakeLists.txt 2018-02-12 11:03:15.002174234 +0100
+@@ -0,0 +1,129 @@
+set(SOURCES Platinum/Source/Core/PltAction.cpp
+ Platinum/Source/Core/PltArgument.cpp
+ Platinum/Source/Core/PltConstants.cpp
@@ -99,9 +99,18 @@
+ Neptune/Source/System/Win32/NptWin32Time.cpp)
+endif()
+
++if(CORE_SYSTEM_NAME STREQUAL "freebsd")
++ list(APPEND SOURCES Neptune/Source/System/Bsd/NptBsdResolver.cpp
++ Neptune/Source/System/Bsd/NptBsdSockets.cpp)
++endif()
++
+
+add_library(upnp STATIC ${SOURCES} ${HEADERS})
+target_compile_definitions(upnp PUBLIC -DNPT_CONFIG_ENABLE_LOGGING)
++if(CORE_SYSTEM_NAME STREQUAL "freebsd")
++ target_compile_definitions(upnp PUBLIC -DNPT_CONFIG_HAVE_GETADDRINFO)
++endif()
++
+target_include_directories(upnp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
+ Platinum/Source/Core
+ Platinum/Source/Platinum