1313
1414
1515
16- void ofAddon::getFrameworksRecursively (const fs::path & path, string platform) {
16+ void ofAddon::getFrameworksRecursively (const fs::path & path, string platform, string packageTarget ) {
1717// alert ("getFrameworksRecursively for " + platform + " : " + path.string(), 34);
1818 if (!fs::exists (path) || !fs::is_directory (path)) return ;
1919
@@ -33,7 +33,7 @@ void ofAddon::getFrameworksRecursively(const fs::path & path, string platform) {
3333 frameworks.emplace_back (f.string ());
3434 }
3535 if (f.extension () == " .xcframework" ) {
36- if ( platform != " macos " && platform != " osx " ){ // we don't want to add xcFrameworks for osx and just treat them like lib folders
36+ if ( packageTarget == " ios " || packageTarget == " tvos " ){ // we don't want to add xcFrameworks for osx and just treat them like lib folders
3737 xcframeworks.emplace_back (f.string ());
3838 }
3939 }
@@ -793,11 +793,13 @@ void ofAddon::parseLibsPath(const fs::path & libsPath, const fs::path & parentFo
793793
794794 if (platform == " osx" || platform == " macos" || platform == " ios" || platform == " tvos" ){
795795 // Horrible hack to make it work with the bad idea of renaming osx to macos
796- getLibsRecursively (libsPath, libFiles, libs, " macos" );
797- getLibsRecursively (libsPath, libFiles, libs, " osx" );
796+ // Note: we have to pass the platform through so we can do different things for osx and ios/tvos target as they both use "macos" for some reason
797+ getLibsRecursively (libsPath, libFiles, libs, " macos" , " " , " " , platform);
798+ getLibsRecursively (libsPath, libFiles, libs, " osx" , " " , " " , platform);
798799
799- getFrameworksRecursively (libsPath, " macos" );
800- getFrameworksRecursively (libsPath, " osx" );
800+ // Note: we have to pass the platform through so we can do different things for osx and ios/tvos target as they both use "macos" for some reason
801+ getFrameworksRecursively (libsPath, " macos" , platform);
802+ getFrameworksRecursively (libsPath, " osx" , platform);
801803// getXCFrameworksRecursively(libsPath, "macos");
802804// getXCFrameworksRecursively(libsPath, "osx");
803805
0 commit comments