builds(deps): use miniupnpc package instead of submodule (#1971)
Co-authored-by: Cameron Gutman <aicommander@gmail.com>
This commit is contained in:
@@ -11,6 +11,9 @@ add_definitions(-DCURL_STATICLIB)
|
||||
include_directories(SYSTEM ${CURL_STATIC_INCLUDE_DIRS})
|
||||
link_directories(${CURL_STATIC_LIBRARY_DIRS})
|
||||
|
||||
# miniupnpc
|
||||
add_definitions(-DMINIUPNP_STATICLIB)
|
||||
|
||||
# extra tools/binaries for audio/display devices
|
||||
add_subdirectory(tools) # todo - this is temporary, only tools for Windows are needed, for now
|
||||
|
||||
@@ -70,6 +73,7 @@ list(PREPEND PLATFORM_LIBRARIES
|
||||
userenv
|
||||
synchronization.lib
|
||||
avrt
|
||||
iphlpapi
|
||||
${CURL_STATIC_LIBRARIES})
|
||||
|
||||
if(SUNSHINE_ENABLE_TRAY)
|
||||
|
||||
@@ -16,26 +16,8 @@ find_package(Threads REQUIRED)
|
||||
pkg_check_modules(CURL REQUIRED libcurl)
|
||||
|
||||
# miniupnp
|
||||
if(SUNSHINE_SYSTEM_MINIUPNP)
|
||||
pkg_check_modules(MINIUPNP miniupnpc REQUIRED)
|
||||
|
||||
# Use includedir pkg-config variable rather than MINIUPNP_INCLUDE_DIRS
|
||||
# defined above. The latter may be blank, as pkg-config sometimes omits -I
|
||||
# flags for directories that are searched by default (e.g. /usr/include),
|
||||
# but we need a value to append /miniupnpc to. Normally source files would
|
||||
# prefix their #include directives with miniupnpc/, but this does not align
|
||||
# with the directory structure of the git submodule used below.
|
||||
pkg_get_variable(MINIUPNP_INCLUDE_DIR miniupnpc includedir)
|
||||
include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIR}/miniupnpc)
|
||||
else()
|
||||
set(UPNPC_BUILD_SHARED OFF CACHE BOOL "No shared libraries")
|
||||
set(UPNPC_BUILD_TESTS OFF CACHE BOOL "Don't build tests for miniupnpc")
|
||||
set(UPNPC_BUILD_SAMPLE OFF CACHE BOOL "Don't build samples for miniupnpc")
|
||||
set(UPNPC_NO_INSTALL ON CACHE BOOL "Don't install any libraries build for miniupnpc")
|
||||
set(MINIUPNP_LIBRARIES libminiupnpc-static)
|
||||
add_subdirectory(third-party/miniupnp/miniupnpc)
|
||||
include_directories(SYSTEM third-party/miniupnp/miniupnpc/include)
|
||||
endif()
|
||||
pkg_check_modules(MINIUPNP miniupnpc REQUIRED)
|
||||
include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIRS})
|
||||
|
||||
# ffmpeg pre-compiled binaries
|
||||
if(WIN32)
|
||||
|
||||
@@ -4,7 +4,6 @@ option(SUNSHINE_CONFIGURE_ONLY "Configure special files only, then exit." OFF)
|
||||
option(SUNSHINE_ENABLE_TRAY "Enable system tray icon. This option will be ignored on macOS." ON)
|
||||
option(SUNSHINE_REQUIRE_TRAY "Require system tray icon. Fail the build if tray requirements are not met." ON)
|
||||
|
||||
option(SUNSHINE_SYSTEM_MINIUPNP "Use system installation of MiniUPnP rather than the submodule." OFF)
|
||||
option(SUNSHINE_SYSTEM_WAYLAND_PROTOCOLS "Use system installation of wayland-protocols rather than the submodule." OFF)
|
||||
|
||||
if(APPLE)
|
||||
|
||||
Reference in New Issue
Block a user