diff options
author | scottbyer@chromium.org <scottbyer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-29 16:47:58 +0000 |
---|---|---|
committer | scottbyer@chromium.org <scottbyer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-29 16:47:58 +0000 |
commit | 71be19b75c1366de0387a78f4623df2f5bf21745 (patch) | |
tree | 0f5ef8118ec09ea1df12916c9f637feaa11fef49 /printing | |
parent | cf7e0777048a9cb4b8201d691a20a24f40a0d6b7 (diff) | |
download | chromium_src-71be19b75c1366de0387a78f4623df2f5bf21745.zip chromium_src-71be19b75c1366de0387a78f4623df2f5bf21745.tar.gz chromium_src-71be19b75c1366de0387a78f4623df2f5bf21745.tar.bz2 |
Mac cloud print proxy work.
Turn on use_cups for the Mac, add in the required library, and tweak the code
to get it linking. There is still more work to do; this is just a gyp-oriented
change to get things started.
BUG=none
TEST=All targets still build on all platforms.
Review URL: http://codereview.chromium.org/4167006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64441 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing')
-rw-r--r-- | printing/backend/print_backend_cups.cc | 6 | ||||
-rw-r--r-- | printing/printing.gyp | 22 |
2 files changed, 22 insertions, 6 deletions
diff --git a/printing/backend/print_backend_cups.cc b/printing/backend/print_backend_cups.cc index 9693299..09fdf1d 100644 --- a/printing/backend/print_backend_cups.cc +++ b/printing/backend/print_backend_cups.cc @@ -6,7 +6,9 @@ #include <dlfcn.h> #include <errno.h> +#if !defined(OS_MACOSX) #include <gcrypt.h> +#endif #include <pthread.h> #include "base/file_util.h" @@ -18,6 +20,7 @@ #include "googleurl/src/gurl.h" #include "printing/backend/cups_helper.h" +#if !defined(OS_MACOSX) GCRY_THREAD_OPTION_PTHREAD_IMPL; namespace { @@ -64,6 +67,7 @@ class GcryptInitializer { }; } // namespace +#endif namespace printing { @@ -182,8 +186,10 @@ bool PrintBackendCUPS::IsValidPrinter(const std::string& printer_name) { scoped_refptr<PrintBackend> PrintBackend::CreateInstance( const DictionaryValue* print_backend_settings) { +#if !defined(OS_MACOSX) // Initialize gcrypt library. Singleton<GcryptInitializer>::get(); +#endif std::string print_server_url_str; if (print_backend_settings) { diff --git a/printing/printing.gyp b/printing/printing.gyp index ac87ab3..7acb6d7 100644 --- a/printing/printing.gyp +++ b/printing/printing.gyp @@ -112,12 +112,6 @@ ], }], ['use_cups==1', { - 'link_settings': { - 'libraries': [ - '-lcups', - '-lgcrypt', - ], - }, 'defines': [ # PRINT_BACKEND_AVAILABLE disables the default dummy implementation # of the print backend and enables a custom implementation instead. @@ -128,6 +122,22 @@ 'backend/cups_helper.h', 'backend/print_backend_cups.cc', ], + 'conditions': [ + ['OS=="mac"', { + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/usr/lib/libcups.dylib', + ] + }, + }, { + 'link_settings': { + 'libraries': [ + '-lcups', + '-lgcrypt', + ], + }, + }], + ], }], ], }, |