From 017616c4fc99883323c2a0d6e44b88f7cd16ce2d Mon Sep 17 00:00:00 2001 From: Dmitry Zhulanov Date: Sat, 1 Oct 2016 17:08:49 +0700 Subject: fix cmake warning and remove whole xverbs code from compilation without yaml (bzr r15136.1.11) --- src/main-cmdlinexact.cpp | 11 ++++------- src/main-cmdlinexact.h | 4 +++- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/main-cmdlinexact.cpp b/src/main-cmdlinexact.cpp index f29d22377..f5db522ae 100644 --- a/src/main-cmdlinexact.cpp +++ b/src/main-cmdlinexact.cpp @@ -38,7 +38,7 @@ * # inkscape have a lot of useful verbs * - verb-id: FileQuit */ - +#ifdef WITH_YAML #include #include #include @@ -52,9 +52,8 @@ #include #include "main-cmdlinexact.h" -#ifdef WITH_YAML + #include "yaml.h" -#endif // WITH_YAML #include "extension/system.h" #include "file.h" @@ -315,9 +314,6 @@ typedef std::list verbs_list_t; void CmdLineXAction::createActionsFromYAML( gchar const *yaml_filename ) { -#ifndef WITH_YAML - return; -#else // WITH_YAML FILE *fh = fopen(yaml_filename, "r"); if(fh == NULL) { printf("Failed to open file!\n"); @@ -535,12 +531,13 @@ CmdLineXAction::createActionsFromYAML( gchar const *yaml_filename ) { } fflush(stdout); -#endif // WITH_YAML } } // Inkscape +#endif // WITH_YAML + /* Local Variables: mode:c++ diff --git a/src/main-cmdlinexact.h b/src/main-cmdlinexact.h index 1ac630e55..8634f3875 100644 --- a/src/main-cmdlinexact.h +++ b/src/main-cmdlinexact.h @@ -2,6 +2,8 @@ #ifndef __INK_MAIN_CMD_LINE_XACTIONS_H__ #define __INK_MAIN_CMD_LINE_XACTIONS_H__ +#ifdef WITH_YAML + /** \file * Extended actions that can be queued at the yaml file */ @@ -37,7 +39,7 @@ public: } // Inkscape - +#endif // WITH_YAML #endif /* __INK_MAIN_CMD_LINE_XACTIONS_H__ */ /* -- cgit v1.2.3