@@ -28,6 +28,7 @@ enum optionIndex { UNKNOWN,
2828 GET_HOST_PLATFORM,
2929 COMMAND,
3030 BACKUP_PROJECT_FILES,
31+ FRAMEWORKS
3132};
3233
3334constexpr option::Descriptor usage[] = {
@@ -47,6 +48,9 @@ constexpr option::Descriptor usage[] = {
4748 { GET_HOST_PLATFORM, 0 , " i" , " platform" , option::Arg::None, " --getplatform, -i \t return the current host platform" },
4849 { COMMAND, 0 , " c" , " command" , option::Arg::None, " --command, -c \t runs command" },
4950 { BACKUP_PROJECT_FILES, 0 , " b" , " backup" , option::Arg::None, " --backup, -b \t backup project files when replacing with template" },
51+
52+ { FRAMEWORKS, 0 , " f" , " frameworks" , option::Arg::Optional, " --frameworks, -f \t frameworks list (such as Vision,ARKit)" },
53+
5054 { 0 , 0 , 0 , 0 , 0 , 0 }
5155};
5256
@@ -72,6 +76,7 @@ fs::path ofPath;
7276vector<string> addons;
7377vector<fs::path> srcPaths;
7478vector<string> targets;
79+ vector<string> frameworks;
7580string ofPathEnv;
7681string templateName;
7782
@@ -460,6 +465,7 @@ int main(int argc, char ** argv) {
460465 printVersion ();
461466 return EXIT_OK;
462467 }
468+
463469
464470 if (options[OFPATH].count () > 0 ) {
465471 if (options[OFPATH].arg != NULL ) {
@@ -541,6 +547,13 @@ int main(int argc, char ** argv) {
541547 }
542548#endif
543549
550+ if (options[FRAMEWORKS].count () > 0 ) {
551+ bAddonsPassedIn = true ; // could be empty
552+ if (options[FRAMEWORKS].arg != NULL ) {
553+ frameworks = ofSplitString (options[FRAMEWORKS].arg , " ," , true , true );
554+ cout << " frameworks " << options[FRAMEWORKS].arg << endl;
555+ }
556+ }
544557
545558
546559 if (parse.nonOptionsCount () > 0 ) {
@@ -688,7 +701,10 @@ int main(int argc, char ** argv) {
688701 if (bAddonsPassedIn){
689702 for (auto & addon : addons) {
690703 project->addAddon (addon);
691- }
704+ }
705+ for (auto & f : frameworks) {
706+ project->addFramework (f, " " , true );
707+ }
692708 }else {
693709 project->parseAddons ();
694710 }
0 commit comments