forked from Mirrors/openclonk
cmake: Add required libixml to UPnP libraries
Earlier versions of ld(1) would attempt to implicitly satisfy link requirements by checking the dependencies of linked-in libraries. Current versions don't do this anymore, so we need to explicitly spell out all dependent libraries on the linker command line.
parent
23d54ea2c9
commit
6979657962
|
@ -9,6 +9,7 @@
|
|||
# OpenClonk, http://www.openclonk.org
|
||||
#
|
||||
# Copyright (c) 2012 Armin Burgmeier
|
||||
# Copyright (c) 2012 Nicolas Hake
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
|
@ -23,14 +24,16 @@
|
|||
|
||||
find_path(UPNP_INCLUDE_DIR NAMES upnp.h PATH_SUFFIXES upnp)
|
||||
set(UPNP_NAMES ${UPNP_NAMES} upnp)
|
||||
set(IXML_NAMES ${IXML_NAMES} ixml)
|
||||
find_library(UPNP_LIBRARY NAMES ${UPNP_NAMES})
|
||||
find_library(IXML_LIBRARY NAMES ${IXML_NAMES})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(UPNP DEFAULT_MSG UPNP_LIBRARY UPNP_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(UPNP DEFAULT_MSG UPNP_LIBRARY IXML_LIBRARY UPNP_INCLUDE_DIR)
|
||||
|
||||
if(UPNP_FOUND)
|
||||
set(UPNP_LIBRARIES ${UPNP_LIBRARY})
|
||||
set(UPNP_LIBRARIES ${UPNP_LIBRARY} ${IXML_LIBRARY})
|
||||
set(UPNP_INCLUDE_DIR ${UPNP_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(UPNP_LIBRARY UPNP_INCLUDE_DIR)
|
||||
mark_as_advanced(UPNP_LIBRARY IXML_LIBRARY UPNP_INCLUDE_DIR)
|
||||
|
|
Loading…
Reference in New Issue