diff --git a/toolsrc/src/commands_other.cpp b/toolsrc/src/commands_other.cpp index 2cafd5453f..0c56e0f79d 100644 --- a/toolsrc/src/commands_other.cpp +++ b/toolsrc/src/commands_other.cpp @@ -73,22 +73,6 @@ namespace vcpkg exit(EXIT_SUCCESS); } - void owns_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths) - { - args.check_max_args(1); - if (args.command_arguments.size() == 0) - { - System::println(System::color::error, "Error: owns requires a pattern to search for as the first argument."); - std::cout << - "example:\n" - " vcpkg owns .dll\n"; - exit(EXIT_FAILURE); - } - StatusParagraphs status_db = database_load_check(paths); - search_file(paths, args.command_arguments[0], status_db); - exit(EXIT_SUCCESS); - } - void internal_test_command(const vcpkg_cmd_arguments& /*args*/, const vcpkg_paths& /*paths*/) { // auto data = FormatEventData("test"); diff --git a/toolsrc/src/commands_owns.cpp b/toolsrc/src/commands_owns.cpp new file mode 100644 index 0000000000..1c54b35f7f --- /dev/null +++ b/toolsrc/src/commands_owns.cpp @@ -0,0 +1,23 @@ +#include "vcpkg_Commands.h" +#include "vcpkg_System.h" +#include "vcpkg.h" +#include + +namespace vcpkg +{ + void owns_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths) + { + args.check_max_args(1); + if (args.command_arguments.size() == 0) + { + System::println(System::color::error, "Error: owns requires a pattern to search for as the first argument."); + std::cout << + "example:\n" + " vcpkg owns .dll\n"; + exit(EXIT_FAILURE); + } + StatusParagraphs status_db = database_load_check(paths); + search_file(paths, args.command_arguments[0], status_db); + exit(EXIT_SUCCESS); + } +} diff --git a/toolsrc/vcpkg/vcpkg.vcxproj b/toolsrc/vcpkg/vcpkg.vcxproj index 475868b271..899ea2e5ea 100644 --- a/toolsrc/vcpkg/vcpkg.vcxproj +++ b/toolsrc/vcpkg/vcpkg.vcxproj @@ -132,6 +132,7 @@ + diff --git a/toolsrc/vcpkg/vcpkg.vcxproj.filters b/toolsrc/vcpkg/vcpkg.vcxproj.filters index 75ebc38e4c..e31b53d6c7 100644 --- a/toolsrc/vcpkg/vcpkg.vcxproj.filters +++ b/toolsrc/vcpkg/vcpkg.vcxproj.filters @@ -60,6 +60,9 @@ Source Files + + Source Files +