]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: Add FCGI_INCLUDE_DIR to include_directories for rgw
authorTim Serong <tserong@suse.com>
Tue, 28 Jun 2016 11:51:32 +0000 (21:51 +1000)
committerTim Serong <tserong@suse.com>
Tue, 28 Jun 2016 13:21:17 +0000 (23:21 +1000)
rgw_fcgi.{cc,h} includes either "fastcgi/fcgiapp.h" or "fcgiapp.h",
depending on whether FASTCGI_INCLUDE_DIR is set.  That define is set by
autotools, but cmake builds work a little differently -- in the cmake
case, FCGI_INCLUDE_DIR is set by Findfcgi.cmake, provided it can find
the fastcgi headers *somewhere*.  This means the cmake build breaks on
SUSE distros (and presumably others) which use "fastcgi/fcgiapp.h",
because FASTCGI_INCLUDE_DIR isn't set, so it tries to include
"fcgiapp.h", and fails.

This change adds FCGI_INCLUDE_DIR to the include directories, and tries
to #include <fcgiapp.h> if FASTCGI_INCLUDE_DIR is not set, which should
work for both cmake and autotools builds.

(It would probably be cleanest to fix autotools to behave like cmake,
then the #ifdef/#else stuff can be dropped, and we could just always
include <fcgiapp.h>)

Signed-off-by: Tim Serong <tserong@suse.com>
src/rgw/CMakeLists.txt
src/rgw/rgw_fcgi.cc
src/rgw/rgw_fcgi.h

index 370aa0ec93216bc479f3201f192d139861504a6e..60004eb78f5840f5b23ba65ca71416c6516116e6 100644 (file)
@@ -1,3 +1,5 @@
+include_directories(${FCGI_INCLUDE_DIR})
+
 add_executable(ceph_rgw_jsonparser
   rgw_jsonparser.cc
   rgw_common.cc
index bbc19d81dda3d114fd44723d26151325ea80ad69..245d4075613bb7ec79e36df5f20f6e6ed4e6b34e 100644 (file)
@@ -7,7 +7,7 @@
 #ifdef FASTCGI_INCLUDE_DIR
 # include "fastcgi/fcgiapp.h"
 #else
-# include "fcgiapp.h"
+# include <fcgiapp.h>
 #endif
 
 
index d83e03f5e6372194101a39bf81d9bebf33dcfdbb..7b906840d97e9aa37c5a69ec73d44bf26bc1cefb 100644 (file)
@@ -8,7 +8,7 @@
 #ifdef FASTCGI_INCLUDE_DIR
 # include "fastcgi/fcgiapp.h"
 #else
-# include "fcgiapp.h"
+# include <fcgiapp.h>
 #endif
 
 #include "rgw_client_io.h"