diff options
-rw-r--r-- | rlz/examples/rlz_id.cc | 13 | ||||
-rw-r--r-- | rlz/rlz.gyp | 13 |
2 files changed, 23 insertions, 3 deletions
diff --git a/rlz/examples/rlz_id.cc b/rlz/examples/rlz_id.cc new file mode 100644 index 0000000..ce01f18 --- /dev/null +++ b/rlz/examples/rlz_id.cc @@ -0,0 +1,13 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "rlz/lib/machine_id.h" + +int main() { + std::string machine_id; + if (!rlz_lib::GetMachineId(&machine_id)) + return 1; + + printf("%s\n", machine_id.c_str()); +} diff --git a/rlz/rlz.gyp b/rlz/rlz.gyp index 5b0db4b7..5284134 100644 --- a/rlz/rlz.gyp +++ b/rlz/rlz.gyp @@ -27,7 +27,6 @@ { 'target_name': 'rlz_lib', 'type': 'static_library', - 'include_dirs': [], 'dependencies': [ '../base/base.gyp:base', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', @@ -99,7 +98,6 @@ { 'target_name': 'rlz_unittests', 'type': 'executable', - 'include_dirs': [], 'dependencies': [ ':rlz_lib', '../base/base.gyp:base', @@ -128,6 +126,16 @@ }] ], }, + { + 'target_name': 'rlz_id', + 'type': 'executable', + 'dependencies': [ + ':rlz_lib', + ], + 'sources': [ + 'examples/rlz_id.cc', + ], + }, ], 'conditions': [ ['OS=="win"', { @@ -135,7 +143,6 @@ { 'target_name': 'rlz', 'type': 'shared_library', - 'include_dirs': [], 'sources': [ 'win/dll/dll_main.cc', 'win/dll/exports.cc', |