Merge pull request #25959 from neo1973/TagLib_deprecation_warnings
[xbmc.git] / lib / libUPnP / CMakeLists.txt
blob313893e41d037b7c2eb22bc8b106f28a346fe6d3
1 set(SOURCES Platinum/Source/Core/PltAction.cpp
2             Platinum/Source/Core/PltArgument.cpp
3             Platinum/Source/Core/PltConstants.cpp
4             Platinum/Source/Core/PltCtrlPoint.cpp
5             Platinum/Source/Core/PltCtrlPointTask.cpp
6             Platinum/Source/Core/PltDatagramStream.cpp
7             Platinum/Source/Core/PltDeviceData.cpp
8             Platinum/Source/Core/PltDeviceHost.cpp
9             Platinum/Source/Core/PltEvent.cpp
10             Platinum/Source/Core/PltHttp.cpp
11             Platinum/Source/Core/PltHttpClientTask.cpp
12             Platinum/Source/Core/PltHttpServer.cpp
13             Platinum/Source/Core/PltHttpServerTask.cpp
14             Platinum/Source/Core/PltIconsData.cpp
15             Platinum/Source/Core/PltMimeType.cpp
16             Platinum/Source/Core/PltProtocolInfo.cpp
17             Platinum/Source/Core/PltService.cpp
18             Platinum/Source/Core/PltSsdp.cpp
19             Platinum/Source/Core/PltStateVariable.cpp
20             Platinum/Source/Core/PltTaskManager.cpp
21             Platinum/Source/Core/PltThreadTask.cpp
22             Platinum/Source/Core/PltUPnP.cpp
23             Platinum/Source/Devices/MediaServer/PltDidl.cpp
24             Platinum/Source/Devices/MediaServer/PltFileMediaServer.cpp
25             Platinum/Source/Devices/MediaServer/PltMediaBrowser.cpp
26             Platinum/Source/Devices/MediaServer/PltMediaCache.cpp
27             Platinum/Source/Devices/MediaServer/PltMediaItem.cpp
28             Platinum/Source/Devices/MediaServer/PltMediaServer.cpp
29             Platinum/Source/Devices/MediaServer/ConnectionManagerSCPD.cpp
30             Platinum/Source/Devices/MediaServer/ContentDirectorySCPD.cpp
31             Platinum/Source/Devices/MediaServer/ContentDirectorywSearchSCPD.cpp
32             Platinum/Source/Devices/MediaServer/PltSyncMediaBrowser.cpp
33             Neptune/Source/Core/Neptune.cpp
34             Neptune/Source/Core/NptAutomaticCleaner.cpp
35             Neptune/Source/Core/NptBase64.cpp
36             Neptune/Source/Core/NptBufferedStreams.cpp
37             Neptune/Source/Core/NptCommon.cpp
38             Neptune/Source/Core/NptDataBuffer.cpp
39             Neptune/Source/Core/NptDebug.cpp
40             Neptune/Source/Core/NptFile.cpp
41             Neptune/Source/Core/NptHash.cpp
42             Neptune/Source/Core/NptHttp.cpp
43             Neptune/Source/Core/NptList.cpp
44             Neptune/Source/Core/NptLogging.cpp
45             Neptune/Source/Core/NptMessaging.cpp
46             Neptune/Source/Core/NptNetwork.cpp
47             Neptune/Source/Core/NptQueue.cpp
48             Neptune/Source/Core/NptResults.cpp
49             Neptune/Source/Core/NptRingBuffer.cpp
50             Neptune/Source/Core/NptSimpleMessageQueue.cpp
51             Neptune/Source/Core/NptSockets.cpp
52             Neptune/Source/Core/NptStreams.cpp
53             Neptune/Source/Core/NptStrings.cpp
54             Neptune/Source/Core/NptSystem.cpp
55             Neptune/Source/Core/NptThreads.cpp
56             Neptune/Source/Core/NptTime.cpp
57             Neptune/Source/Core/NptTls.cpp
58             Neptune/Source/Core/NptUri.cpp
59             Neptune/Source/Core/NptUtils.cpp
60             Neptune/Source/Core/NptXml.cpp
61             Neptune/Source/System/Bsd/NptBsdResolver.cpp
62             Neptune/Source/System/Bsd/NptBsdSockets.cpp
63             Neptune/Source/System/StdC/NptStdcDebug.cpp
64             Neptune/Source/System/StdC/NptStdcEnvironment.cpp
65             Platinum/Source/Devices/MediaRenderer/PltMediaRenderer.cpp
66             Platinum/Source/Devices/MediaRenderer/PltMediaController.cpp
67             Platinum/Source/Devices/MediaRenderer/AVTransportSCPD.cpp
68             Platinum/Source/Devices/MediaRenderer/RdrConnectionManagerSCPD.cpp
69             Platinum/Source/Devices/MediaRenderer/RenderingControlSCPD.cpp
70             Platinum/Source/Devices/MediaConnect/X_MS_MediaReceiverRegistrarSCPD.cpp
71             Platinum/Source/Devices/MediaConnect/PltMediaConnect.cpp
72             Neptune/Source/System/Posix/NptPosixEnvironment.cpp)
74 if(NOT CORE_SYSTEM_NAME STREQUAL windows AND NOT CORE_SYSTEM_NAME STREQUAL windowsstore)
75   list(APPEND SOURCES Neptune/Source/System/Posix/NptPosixSystem.cpp
76                       Neptune/Source/System/Posix/NptSelectableMessageQueue.cpp
77                       Neptune/Source/System/Posix/NptPosixQueue.cpp
78                       Neptune/Source/System/Posix/NptPosixThreads.cpp
79                       Neptune/Source/System/Posix/NptPosixTime.cpp
80                       Neptune/Source/System/Bsd/NptBsdNetwork.cpp)
81   if(APPLE)
82     list(APPEND SOURCES Neptune/Source/System/Apple/NptAppleAutoreleasePool.mm)
83     set_property(SOURCE Neptune/Source/System/Apple/NptAppleAutoreleasePool.mm APPEND_STRING PROPERTY COMPILE_OPTIONS "-fno-objc-arc")
84   else()
85     list(APPEND SOURCES Neptune/Source/System/Null/NptNullAutoreleasePool.cpp)
86   endif()
87 else()
88   list(APPEND SOURCES Neptune/Source/System/Win32/NptWin32Console.cpp
89                       Neptune/Source/System/Win32/NptWin32Debug.cpp
90                       Neptune/Source/System/Win32/NptWin32DynamicLibraries.cpp
91                       Neptune/Source/System/Win32/NptWin32MessageQueue.cpp
92                       Neptune/Source/System/Win32/NptWin32Network.cpp
93                       Neptune/Source/System/Win32/NptWin32Queue.cpp
94                       Neptune/Source/System/Win32/NptWin32SerialPort.cpp
95                       Neptune/Source/System/Win32/NptWin32System.cpp
96                       Neptune/Source/System/Win32/NptWin32Threads.cpp
97                       Neptune/Source/System/Win32/NptWin32Time.cpp)
98 endif()
100 if(CORE_SYSTEM_NAME STREQUAL "freebsd")
101   list(APPEND SOURCES Neptune/Source/System/Bsd/NptBsdResolver.cpp
102                       Neptune/Source/System/Bsd/NptBsdSockets.cpp)
103 endif()
106 add_library(upnp STATIC ${SOURCES} ${HEADERS})
107 target_compile_definitions(upnp PUBLIC -DNPT_CONFIG_ENABLE_LOGGING)
108 if(CORE_SYSTEM_NAME STREQUAL "freebsd")
109   target_compile_definitions(upnp PUBLIC -DNPT_CONFIG_HAVE_GETADDRINFO)
110 endif()
112 set(INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}
113                         Platinum/Source/Core
114                         Platinum/Source/Platinum
115                         Platinum/Source/Devices/MediaConnect
116                         Platinum/Source/Devices/MediaRenderer
117                         Platinum/Source/Devices/MediaServer
118                         Neptune/Source/Core
119                         Neptune/Source/System/Posix)
120 target_include_directories(upnp SYSTEM INTERFACE ${INCLUDE_DIRECTORIES})
121 target_include_directories(upnp PRIVATE ${INCLUDE_DIRECTORIES})
122 if(CORE_SYSTEM_NAME STREQUAL windows OR CORE_SYSTEM_NAME STREQUAL windowsstore)
123   target_include_directories(upnp PRIVATE Neptune/Source/System/Win32)
124 endif()
125 set_target_properties(upnp PROPERTIES CXX_CLANG_TIDY "")
126 set_target_properties(upnp PROPERTIES CXX_CPPCHECK "")
127 set_target_properties(upnp PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "")
128 set_target_properties(upnp PROPERTIES FOLDER lib)
129 source_group_by_folder(upnp)
131 # Link this target lib to core
132 target_link_libraries(lib${APP_NAME_LC} PUBLIC upnp)
134 if(CORE_SYSTEM_NAME STREQUAL windowsstore)
135         set_target_properties(upnp PROPERTIES STATIC_LIBRARY_FLAGS "/ignore:4264")
136 endif()