cmake gupnp detection fails

Bug #1020802 reported by Pim Vullers
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Noise
Fix Released
Medium
Pim Vullers

Bug Description

When trying to build noise I get the following error:

-- checking for module 'gupnp-1.0'
-- found gupnp-1.0, version 0.18.3
-- UPnP Plugin enabled
-- checking for module 'gupnp-av-1.0'
-- package 'gupnp-av-1.0' not found
-- UPnP Plugin disabled
...
-- GSettings schemas will be installed locally.
-- GSettings schemas will be installed into /usr/share/glib-2.0/schemas/
CMake Error at plugins/CMakeLists.txt:4 (if):
  if given arguments:

    "1" "AND"

  Unknown arguments specified

-- Configuring incomplete, errors occurred!

The corresponding part is (plugins/CMakeLists.txt):

if (${GUPNP_FOUND} AND ${GUPNP_AV_FOUND})
add_subdirectory (UPnP)
endif()

These variables are set here (CMakeLists.txt):

pkg_check_modules(GUPNP gupnp-1.0)
if(${GUPNP_FOUND})
set(ADD_PKG ${ADD_PKG}
        gupnp-1.0)
set(ADD_OPTIONS ${ADD_OPTIONS})
message("-- UPnP Plugin enabled")
else()
message("-- UPnP Plugin disabled")
endif()

pkg_check_modules(GUPNP_AV gupnp-av-1.0)
if(${GUPNP_AV_FOUND})
set(ADD_PKG ${ADD_PKG}
        gupnp-av-1.0)
set(ADD_OPTIONS ${ADD_OPTIONS})
message("-- UPnP Plugin enabled")
else()
message("-- UPnP Plugin disabled")
endif()

My guess is that either the check should be improved, or in the else clauses the variables should be set to "0".

Related branches

Revision history for this message
Pim Vullers (pimvullers) wrote :

The linked branch solves the issue by explicitly setting the variables to '0' if the related modules are not found.

Pim Vullers (pimvullers)
Changed in noise:
status: New → Fix Committed
assignee: nobody → Pim Vullers (pimvullers)
Changed in noise:
importance: Undecided → Medium
milestone: none → luna-beta1
Revision history for this message
Pim Vullers (pimvullers) wrote :

Thanks victored for the quick approval... you merged before I got the patch setup in me Gentoo build system :)

Changed in noise:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.