-
Notifications
You must be signed in to change notification settings - Fork 47
Add CMake config using pkg-config internally #101
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
Conversation
|
Hi @wxmerkt , I gave a shot to CMake export + jrl-cmakemodule on dynamic-graph and I have a preliminary version working. It seems to me that the problem comes from the fact you do not install the include in your INSTALL macro (https://github.com/wxmerkt/eigenpy/blob/b518cbefbb0bca5e3aa33045d1e59e8dc6a36ac1/CMakeLists.txt#L130) and then for target_include_directories the INTERFACE option specifies the directory to include, will create the entry in your eigenpyTargets.cmake file is probably ignored as far as I understood as it is used to build the interface. Hope it helps. |
b518cbe to
6f0d3fc
Compare
|
Hi @olivier-stasse,
This minimal example works, but obviously all flags should be set by project(test_test CXX)
find_package(eigenpy REQUIRED)
# TODO: This should not be necessary
find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
# TODO: This should not be necessary
find_package(Boost REQUIRED COMPONENTS python numpy)
# TODO: This should not be necessary
find_package(Eigen3 REQUIRED)
add_library(${PROJECT_NAME} test.cpp)
# TODO: This should only link against `eigenpy::eigenpy`
target_link_libraries(${PROJECT_NAME} PUBLIC eigenpy::eigenpy Boost::python Boost::numpy Eigen3::Eigen)There is a ton of macros in cmake-modules that only use pkg-config and would need to be fixed. It may be easier to do a clean modern CMake from scratch. Thanks, |
I agree, although it requires some work. |
|
Hi, I pretty much think this is my job to do this kind of stuff ; so if you can wait a week or two, I can handle this. |
|
I also agree with @wxmerkt and @jmirabel and it is related to discussions in stack-of-tasks/pinocchio#919 |
|
This was for me the occasion to have a look to the impact to use modern CMake. Another question: should we continue with submodule or use something else ? |
|
Pure CMake based and pkg-config based configuration have both their downsides. The cons of CMake is that you cannot use CMake files outside of CMake. Commiting to CMake is fine for me. The submodule can be useful to configure the generate of the cmake config, target and version files. I also think it is a good idea to continue generating pc files on linux and mac. |
|
@jmirabel I do not think we should continue this discussion but rather on the cmake modules ;) But I agree, we should mainteed the generation of the pkg-config files. |
… MoveIt - MoveIt cannot make a new release right now with our bugfix due to people constraints - We cannot roll back due to project constraints - This adds a cmake config that internally uses the pkg-config. This will be replaced in the future with one with proper CMake targets
|
This is now changed to install a cmake config that internally uses pkg-config. This is a temporary solution to fix the MoveIt builds (per discussion at IROS) and provide backward compatibility with a previously released version. When the targets-export-version in jrl-cmake supports dependencies etc. that are currently handled via pkg-config macros, we will overwrite the cmake config with an automatically generated one (via SETUP_PROJECT_PACKAGE_FINALIZE). |
|
@wxmerkt Do you need a release? |
|
@jcarpent: Yes, please! :-) |
|
Done! |
This is a WIP to test generating a CMake config (#98). This does not yet export the include directories properly (i.e.,
${eigenpy_INCLUDE_DIRS}is not populated). I'd love some feedback on which steps I have missed to include :-)