roboptim / roboptim-core

RobOptim Core Layer: interface and basic mathematical tools
http://www.roboptim.net
GNU Lesser General Public License v3.0
64 stars 35 forks source link

Why don't you use FIND_PACKAGE(...)? #107

Closed phuicy closed 8 years ago

phuicy commented 8 years ago

In CMAKE you use includes and other tools such as ADD_REQUIRED_DEPENDENCY("eigen3 >= 3.2.0") to manage dependencies; instead of the more standard find_package. What is the purpose of this?

bchretien commented 8 years ago

We are using our jrl-cmakemodules that automatically manage dependency pkg-config support (e.g. properly setting compiler flags from dependencies), documentation, pkg-config file generation, etc. Doing things properly in pure CMake is both difficult and extremely verbose. Also, find_package relies on FindXXXXX.cmake scripts, which are often unreliable or simply unavailable. On the other hand, pkg-config is well supported. You can check the CMake documentation on the subject.

phuicy commented 8 years ago

thanks. Is this true for windows?

bchretien commented 8 years ago

Although our code base is mostly used on Linux, pkg-config is also supported on Mac OS X and Windows. For the latter, we've managed to use our CMake modules for different projects built with AppVeyor, with pkg-config support enabled (cf. jrl-umi3218/jrl-travis#28).

phuicy commented 8 years ago

thanks