Cmake install into root

This commit is contained in:
Tobe O 2019-09-29 00:30:52 -04:00
parent 9e92eb2830
commit 1a7bba516d
3 changed files with 9 additions and 3 deletions

View file

@ -4,3 +4,4 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_dart_utils/cmake"
find_package(Dart REQUIRED)
set(CMAKE_CXX_STANDARD 11)
add_subdirectory(lib/src)
install(TARGETS angel_wings LIBRARY DESTINATION "${CMAKE_CURRENT_LIST_DIR}")

View file

@ -7,13 +7,17 @@ import 'package:logging/logging.dart';
import 'package:pretty_logging/pretty_logging.dart';
main() async {
var app = Angel();
hierarchicalLoggingEnabled = true;
var logger = Logger.detached('wings')
..level = Level.ALL
..onRecord.listen(prettyLog);
var app = Angel(logger: logger);
var wings = AngelWings(app);
var fs = LocalFileSystem();
var vDir = CachingVirtualDirectory(app, fs,
source: fs.currentDirectory, allowDirectoryListing: true);
app.logger = Logger('wings')..onRecord.listen(prettyLog);
app.mimeTypeResolver.addExtension('yaml', 'text/x-yaml');
app.get('/', (req, res) => 'WINGS!!!');
@ -21,9 +25,10 @@ main() async {
await req.parseBody();
return req.bodyAsMap;
});
app.fallback(vDir.handleRequest);
app.fallback((req, res) => throw AngelHttpException.notFound());
await wings.startServer(InternetAddress.loopbackIPv6, 3000);
await wings.startServer(InternetAddress.loopbackIPv4, 3000);
print('Listening at ${wings.uri}');
}

View file

@ -1 +0,0 @@
/Users/thosakwe/Source/Angel/wings/lib/src/libangel_wings.dylib

BIN
libangel_wings.dylib Executable file

Binary file not shown.