Skip to content

Update vs template for when multiple addons with identical class names are used. #5655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 4, 2017

Conversation

bakercp
Copy link
Member

@bakercp bakercp commented Jun 9, 2017

@bakercp bakercp modified the milestone: 0.10.0 Jun 14, 2017
@bakercp bakercp assigned arturoc and unassigned arturoc Jun 14, 2017
@arturoc arturoc merged commit ed551f7 into openframeworks:master Jul 4, 2017
@bakercp bakercp deleted the update_vs_template branch July 13, 2017 18:44
@armadillu
Copy link
Contributor

armadillu commented Jan 4, 2018

The current solution:

<ObjectFileName>$(IntDir)/%(RelativeDir)/</ObjectFileName>

can lead to getting the object files all over the place. In my case, I'm including files that are several directories above the project;

For example, I have some addons outside the OF folder itself which leads to my include paths looking like this ..\..\ExternalAddons\ofxScreenSetup\src... Which leads to this path for the obj files "MyOfProject/obj/../../ExternalAddons/ofxScreenSetup\src/*.obj". I end up with two random folders inside my project folder; one called ExternalAddons and one called OpenFrameworks.

All of this weird path arrangements are to be able to keep OF as a submodule inside a project git repo; in our company we need to be able to clone projects easily, so we came up with a git repo structure where the project itself is in the main repo, and OF and whatever addons are required are added to the repo as submodules. This means we can't put anyhting inside the OF folder, thus having this ../../ paths all over the place.

@armadillu
Copy link
Contributor

I propose we change it to :

 <ObjectFileName>$(IntDir)/$(Platform)/%(Directory)/</ObjectFileName>

Which leads to this obj file setup:
(For this example, building debug and x64)

MyProjectDir/
   MyProject.sln
   MyProject.vcproj
   ...
   obj/
      Debug/
         x64/
            Users/
               oriol/
                  Desktop/
                     MyProject/
                        apps/
                           MyProjectDir/
                              src/
                                 main.obj
                                 *.obj
                        OpenFrameworks/
                           addons/
                              oxOsc/
                                 src/
                                    *.obj

This create really deep folder structures, but it makes sure everything is contained within obj.
Also, it allows you to preserve obj files for different architectures (ie changing 64bit and 32 bit wont lead to a full recompile).

@armadillu
Copy link
Contributor

@bakercp @arturoc Do you guys see any issues with that? Otherwise I will prepare a PR...

@bakercp
Copy link
Member Author

bakercp commented Jan 11, 2018

I have no problems with any solution that continues to solve the original problem. The one issue I'd watch out for is paths getting too long. I've run into a number of very odd errors on windows that turns out to be the result of very long file paths (e.g. elliotwoods/ofxKinectForWindows2#72). So just something to keep an eye on.

@armadillu
Copy link
Contributor

Hmm that is a good catch - ill try find a solution that doens't potentially create this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants