Skip to content

Commit 3ff92b5

Browse files
author
Brian
committed
removed ADDON_PREPROCESSOR_DEFINES and use ADDON_DEFINES instead
1 parent b1ef172 commit 3ff92b5

File tree

3 files changed

+1
-32
lines changed

3 files changed

+1
-32
lines changed

ofxProjectGenerator/src/addons/ofAddon.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ bool ofAddon::checkCorrectVariable(string variable, ConfigParseState state){
140140
variable == "ADDON_DATA" ||
141141
variable == "ADDON_LIBS_EXCLUDE" || variable == "ADDON_SOURCES_EXCLUDE" || variable == "ADDON_INCLUDES_EXCLUDE" ||
142142
variable == "ADDON_DLLS_TO_COPY" ||
143-
variable == "ADDON_DEFINES" || variable == "ADDON_PREPROCESSOR_DEFINITIONS");
143+
variable == "ADDON_DEFINES");
144144
case Unknown:
145145
default:
146146
return false;

ofxProjectGenerator/src/projects/visualStudioProject.cpp

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -367,31 +367,6 @@ void visualStudioProject::addDefine(std::string define, LibType libType)
367367
{
368368
pugi::xpath_node_set items = doc.select_nodes("//ItemDefinitionGroup");
369369
for (int i = 0; i<items.size(); i++) {
370-
pugi::xml_node additionalOptions;
371-
bool found = false;
372-
std::string condition(items[i].node().attribute("Condition").value());
373-
if (libType == RELEASE_LIB && condition.find("Debug") != std::string::npos) {
374-
additionalOptions = items[i].node().child("ClCompile").child("AdditionalOptions");
375-
found = true;
376-
}
377-
else if (libType == DEBUG_LIB && condition.find("Release") != std::string::npos) {
378-
additionalOptions = items[i].node().child("ClCompile").child("AdditionalOptions");
379-
found = true;
380-
}
381-
if (!found) continue;
382-
if (!additionalOptions) {
383-
items[i].node().child("ClCompile").append_child("PreprocessorDefinitions").append_child(pugi::node_pcdata).set_value(define.c_str());
384-
}
385-
else {
386-
additionalOptions.first_child().set_value((std::string(additionalOptions.first_child().value()) + " " + define).c_str());
387-
}
388-
}
389-
}
390-
391-
void visualStudioProject::addPreprocessorDefinitions(std::string define, LibType libType)
392-
{
393-
pugi::xpath_node_set items = doc.select_nodes("//ItemDefinitionGroup");
394-
for (int i = 0; i < items.size(); i++) {
395370
pugi::xml_node additionalOptions;
396371
bool found = false;
397372
std::string condition(items[i].node().attribute("Condition").value());
@@ -491,9 +466,4 @@ void visualStudioProject::addAddon(ofAddon & addon){
491466
addDefine(addon.defines[i], DEBUG_LIB);
492467
}
493468

494-
for (int i = 0; i < (int)addon.preprocessorDefinitions.size(); i++) {
495-
ofLogVerbose() << "adding addon preprocessorDefinitions: " << addon.preprocessorDefinitions[i];
496-
addPreprocessorDefinitions(addon.preprocessorDefinitions[i], RELEASE_LIB);
497-
addPreprocessorDefinitions(addon.preprocessorDefinitions[i], DEBUG_LIB);
498-
}
499469
}

ofxProjectGenerator/src/projects/visualStudioProject.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class visualStudioProject : public baseProject {
2222
void addCFLAG(std::string cflag, LibType libType = RELEASE_LIB); // C
2323
void addCPPFLAG(std::string cppflag, LibType libType = RELEASE_LIB); // C++
2424
void addDefine(std::string define, LibType libType = RELEASE_LIB);
25-
void addPreprocessorDefinitions(std::string define, LibType libType = RELEASE_LIB);
2625

2726
void addAddon(ofAddon & addon);
2827

0 commit comments

Comments
 (0)