Skip to content
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

Fixes for compiling on Windows #41

Merged
merged 5 commits into from
Oct 13, 2015

Conversation

traversaro
Copy link
Contributor

The fixes are the following (tested on Visual Studio 12 on Windows 7):

  • Properly define debug library postfix.
  • Use of a proper cmake FindTinyXML.cmake configuration file, imported from https://github.com/ros/cmake_modules .
  • Export headers used in the library API (TinyXML and Boost).
  • Avoid recreating the source path in the library path during the call to configure_file.

There is still another issue preventing to use the library in Windows, but I opened a separated issue ( #42 ) because is involve a more invasive change to the library structure.

@isucan
Copy link
Contributor

isucan commented Aug 6, 2014

@j-rivero @tfoote ?

@davetcoleman
Copy link
Contributor

Should cmake/FindTinyXML.cmake be replaced with the cmake_modules equivalent, or is that only for catkin packages and this package is a stand-alone package?

@traversaro
Copy link
Contributor Author

@davetcoleman as far as I understand, cmake_modules is a pure catkin package that cannot be installed without catkin. Consequently is not suitable to add it as a urdfdom dependency, because then urdfdom would depend on catkin.

@davetcoleman
Copy link
Contributor

i believe you're right, yes

@j-rivero
Copy link
Contributor

j-rivero commented Aug 7, 2014

Yes, urdfdom is consider as a stand-alone library and it is used outside ROS, in fact it is an official ubuntu package.

@tfoote
Copy link
Member

tfoote commented Aug 7, 2014

This looks like a cleaner solution. It would be really nice if TinyXML installed it's own cmake but until then copying the Find rule will be the cleanest solution.

@j-rivero
Copy link
Contributor

j-rivero commented Aug 8, 2014

Seems like Tinyxml authors designed it to be embedded into other projects, in its own words:

TinyXML is designed to be easy and fast to learn. It is two headers and four cpp files. Simply add these to your project and off you go.

So I won't expect any upstream movement into the line of having a cmake module. In downstream, the things are not easy too, since depending on the distribution, they are shipping custom pkgconfig files which brings some cross distribution discussions.

So yes, +1 to Silvio approach.

@traversaro
Copy link
Contributor Author

@j-rivero I was discussing with our local CMake expert (cc @drdanz ) and he was suggesting that perhaps distribution mantainers could be interested in having a CMake-specific patch.
Considering that upstream is not interested in adding this configuration files, it could make sense to add a TinyXMLConfig.cmake at distribution level, as they already add a pkg-config tinyxml.pc file.
Do you think it is a feasible path?

@tfoote
Copy link
Member

tfoote commented Aug 8, 2014

@traversaro I think that would be a good idea, especially if they're already adding the pkg-config files. The CMake infrastructure is a parallel usage. Of course this will take a while and so we'll have to deal with it in the mean time and for other platforms if it's not being accepted upstream.

@j-rivero
Copy link
Contributor

@traversaro if we speak about distribution level, I agree, I see no reason for providing a .pc file but no a .cmake file. In this cases is totally up to the maintainer. However, it will make things worse at cross-distributions level (see the comments of the Gentoo maintainer in my previous link) with probably a good bunch of problems for not keeping in sync all the tinyxml.cmake floating around.

Another option could be trying to send it to cmake developers as a module so we get it in cmake-data like we have FindPNG, etc.

@traversaro
Copy link
Contributor Author

@isucan @tfoote @j-rivero given the fruitful discussion, I guess we agree that in the short term the solution proposed in this PR (include the proper FindTinyXML.cmake file in the urdfdom repo) is the cleanest solution.

@j-rivero
Copy link
Contributor

@traversaro +1

traversaro and others added 2 commits September 30, 2015 23:39
In Windows find_package(package) finds the PackageConfig.cmake following a set of path patterns [1]:
* <prefix>/ 
* <prefix>/(cmake|CMake)/  
* <prefix>/<name>*/ 
* <prefix>/<name>*/(cmake|CMake)/ 

This commit modifies the CMake config installation to install them in CMAKE_INSTALL_PREFIX/CMake on Windows (see for reference [2]).

[1] : https://cmake.org/cmake/help/v3.0/command/find_package.html
[2] : https://github.com/robotology/ycm/blob/master/modules/InstallBasicPackageFiles.cmake#L175
@traversaro
Copy link
Contributor Author

Merged with current master.
I also did a small modification to the directory of installation of CMake config file to make them easier to find for a default installation, see robotology-dependencies@5866273 .

@traversaro
Copy link
Contributor Author

I also had several other Windows-related fixes that I did an year ago, but I stopped submitting PRs when I saw that upstream was not interested in Windows related patches, and I then simply forked the repo. [1] If now there is interest for Windows-related fix I would be apply to port some of them upstream .

[1] : https://github.com/robotology-dependencies/urdfdom/commits/master

@scpeters
Copy link
Contributor

+1

isucan added a commit that referenced this pull request Oct 13, 2015
@isucan isucan merged commit 6c2300c into ros:master Oct 13, 2015
Karsten1987 pushed a commit to Karsten1987/urdfdom that referenced this pull request Nov 15, 2018
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.

6 participants