Pull SimpleServer out into a public static_library Change-Id: I0bb49116fffe0b8084e17fb1caa900b1cdb6541e
diff --git a/BUILD.gn b/BUILD.gn index 7793f40..fe40d68 100644 --- a/BUILD.gn +++ b/BUILD.gn
@@ -20,12 +20,8 @@ executable("simple_server") { sources = [ "clock_linux.cc", - "protocol.cc", - "server.cc", - "simple_server.cc", "simple_server_main.cc", "sys_time.cc", - "udp_processor.cc", ] defines = [ "USE_GLOG", @@ -33,6 +29,28 @@ ] include_dirs = [ "." ] deps = [ + ":simple_server_lib", + "//third_party/boringssl", + "//third_party/glog", + ] +} + +static_library("simple_server_lib") { + sources = [ + "protocol.cc", + "server.cc", + "simple_server.cc", + "simple_server.h", + "udp_processor.cc", + "udp_processor.h", + ] + defines = [ + "USE_GLOG", + "ROUGHTIME_OPEN_SOURCE", + ] + include_dirs = [ "." ] + public_configs = [ ":client_config" ] + deps = [ "//third_party/boringssl", "//third_party/glog", ]