Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmake] fix build with -DENABLE_MICROHTTP=OFF and without installed libmicrohttpd #11210

Merged
merged 1 commit into from
Dec 20, 2016

Conversation

herrnst
Copy link
Member

@herrnst herrnst commented Dec 18, 2016

Description

Follow-up to http://trac.kodi.tv/ticket/17131 and #11145

With -DENABLE_MICROHTTPD=OFF, xbmc/network/httprequesthandler/* and xbmc/interfaces/legacy/wsgi/* were still compiled, making the compiler stop with "microhttpd.h not found" fatals. This adds if()'s in the CMakeLists.txt of the affected directories, mimic'ing https://github.com/xbmc/xbmc/blob/Krypton/Makefile.in#L126.

Motivation and Context

Fix build without webserver even when libmicrohttpd isn't installed.

How Has This Been Tested?

Build with -DENABLE_MICROHTTPD={OFF,ON}, with and without libmicrohttpd installed.

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the Code guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the CONTRIBUTING document
  • I have added tests to cover my change
  • All new and existing tests passed

@wsnipex wsnipex added Backport: Needed CMake Type: Fix non-breaking change which fixes an issue labels Dec 18, 2016
@wsnipex
Copy link
Member

wsnipex commented Dec 18, 2016

thanks, looks good

@Jalle19
Copy link
Member

Jalle19 commented Dec 19, 2016

Noticed this too while compiling a few days ago, thanks for fixing!

@wsnipex wsnipex merged commit 06c43a3 into xbmc:master Dec 20, 2016
@herrnst herrnst deleted the microhttp branch December 20, 2016 17:24
@MartijnKaijser MartijnKaijser modified the milestone: L 18.0-alpha1 Dec 22, 2016
@MartijnKaijser
Copy link
Member

@herrnst can you make a PR for Krypton as well?

@herrnst
Copy link
Member Author

herrnst commented Dec 29, 2016

Done: #11294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport: Done CMake Type: Fix non-breaking change which fixes an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants