Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions commandLine/src/addons/ofAddon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,14 @@ void ofAddon::addToFolder(const fs::path& path, const fs::path & parentFolder){
filesToFolders[path] = folder;
}


void ofAddon::prepareForWrite() {
removeDuplicates(libs);
removeDuplicates(libFiles);
removeDuplicates(frameworks);
removeDuplicates(xcframeworks);
}

void ofAddon::parseLibsPath(const fs::path & libsPath, const fs::path & parentFolder) {
if (!fs::exists(libsPath)) {
// alert("file not found " + libsPath.string(), 35);
Expand All @@ -781,7 +789,7 @@ void ofAddon::parseLibsPath(const fs::path & libsPath, const fs::path & parentFo
// alert ("parseLibsPath " + libsPath.string() + ", parent=" + parentFolder.string(), 35);


if (platform == "osx" || platform == "macos"){
if (platform == "osx" || platform == "macos" || platform == "ios" || platform == "tvos"){
// Horrible hack to make it work with the bad idea of renaming osx to macos
getLibsRecursively(libsPath, libFiles, libs, "macos");
getLibsRecursively(libsPath, libFiles, libs, "osx");
Expand All @@ -802,15 +810,6 @@ void ofAddon::parseLibsPath(const fs::path & libsPath, const fs::path & parentFo
getLibsRecursively(libsPath, libFiles, libs, platform);
}

if (//platform == "osx" ||
platform == "ios" ||
platform == "tvos"){//} ||
//platform == "macos"){

getFrameworksRecursively(libsPath, platform);
// getXCFrameworksRecursively(libsPath, platform);
}

if (platform == "vs" || platform == "msys2"
|| platform == "vscode"
|| platform == "linux"
Expand Down
9 changes: 9 additions & 0 deletions commandLine/src/addons/ofAddon.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,32 @@ const vector<string> parseStates {
"common",
"linux",
"linux64",
"linux/64",
"msys2",
"vs",
"linuxarmv6l",
"linuxarmv7l",
"linuxaarch64",
"linux/armv6l",
"linux/armv7l",
"linux/aarch64",
"linux/arm64",
"android/armeabi",
"android/armeabi-v7a",
"android/arm64-v8a",
"android/x86",
"android/x86_64",
"emscripten",
"emscripten/32",
"emscripten/64",
"android",
"ios",
"osx",
"tvos",
"macos",
"watchos",
"visionos",
"catos",
};


Expand Down Expand Up @@ -136,6 +144,7 @@ class ofAddon {

bool load(string addonName, const fs::path& projectDir, const string& targetPlatform);

void prepareForWrite();

void clear();

Expand Down
2 changes: 1 addition & 1 deletion commandLine/src/defines.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define OFPROJECTGENERATOR_MAJOR_VERSION "0"
#define OFPROJECTGENERATOR_MINOR_VERSION "86"
#define OFPROJECTGENERATOR_MINOR_VERSION "88"
#define OFPROJECTGENERATOR_PATCH_VERSION "0"

#define PG_VERSION (OFPROJECTGENERATOR_MAJOR_VERSION "." OFPROJECTGENERATOR_MINOR_VERSION "." OFPROJECTGENERATOR_PATCH_VERSION)
Expand Down
4 changes: 3 additions & 1 deletion commandLine/src/projects/baseProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,8 @@ void baseProject::addAddon(ofAddon & addon){
return;
}
}

addon.prepareForWrite();

/*

Expand Down Expand Up @@ -556,6 +558,7 @@ void baseProject::addAddon(ofAddon & addon){
}
// alert("---> dependencies");
addons.emplace_back(addon);


//ofLogVerbose("baseProject") << "libs in addAddon " << addon.libs.size();

Expand All @@ -578,7 +581,6 @@ void baseProject::addAddon(ofAddon & addon){

addAddonDefines(addon);
addAddonFrameworks(addon);
// addAddonXCFrameworks(addon);
copyAddonData(addon);
addAddonProps(addon);
}
Expand Down
Loading
Loading