[opencascade] fix #16252 #16513
Conversation
…h the targets and replacing internal includes from #include "..." to #include<...> post installation
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
|
Hi @Dejauxvue Would you like to add a patch for this changes? Since it was removed by PR #15997, but it is still a problem in current version. So the patch is required. |
I tried applying the patch directly in a naive way and it doesn't seem to work. directly after the same line? Does this even have any effect? |
just to clear up, it basicly does a |
ras0219-msft
left a comment
There was a problem hiding this comment.
Thanks for the fixes! This all generally looks great.
However, I notice that the PR doesn't currently include the portfile changes to swap <>s with ""s that you mentioned here. They seem necessary for our MSBuild integration to work.
Could you explain why they aren't needed or add then to this PR?
|
@ras0219-msft |
|
@ras0219-msft For such ports that export specific include paths in cmake, since we did not provide these paths to msbuild integration after building them, I think that manually adding these paths to the include path of the header file is the only solution. |
|
shouldn't we then install the includes from opencascade directly to include instead of include/opencascade ? |
|
@Dejauxvue We will have a internal discussion. |
|
@Dejauxvue After some discussion, we think that your previous modification to the path in portfile.cmake is correct, please restore it. Sorry. |
|
@JackBoosY |
|
@Dejauxvue I wish too but not. Sorry. |
….> to #include "..."" also refined regex to allow white spaces between # and 'include' This reverts commit 4b36273.
ras0219-msft
left a comment
There was a problem hiding this comment.
This looks great to me, thanks for the hard work here!
Just to double check: you've tested this on x64-windows via CMake; have you tested it via MSBuild? Does it work "out of the box" or is the extra include path required for normal usage?
|
@ras0219-msft
In Summary: MSBuild works; CMake uses different include conventions and not all targets get exported Edit: I applied my suggested changes for the first issue. The second issue does not seem to be related to my changes, I think. As I did not change what targets get exported. Can someone confirm this? Edit2: the second issue is probably not an issue, I just did not link my example to all opencascade targets Edit3: can confirm that the cmake linker error was wrong usage; Tested MSBuild an CMake with the following source code and it compiles and links successfully |
|
Yep, this looks like the right solution to me, thanks for the continued improvement! Just to note specifically in case it wasn't mentioned here: the CMake change adds the root |
fix #16252 by exporting include directories with the targets and replacing internal includes from #include <...> to #include "..." post installation
tested on x64-windows