Commit 2a48068e authored by Tim Übelhör's avatar Tim Übelhör
Browse files

Update README.md

parent c0918180
......@@ -4,10 +4,7 @@ catkin workspace.
# How it's done
[cmake-conan](https://github.com/conan-io/cmake-conan) is used to activate
conan during the cmake build process. It then installs the dependencies from
the conanfile.txt and uses the cmake_find_package generator to generate the
findXXX.cmake files. Those targets can be found via find_package() and later
be linked with the targets.
conan during the cmake build process to install and find the dependencies.
Building with conan requires to define the build type:
``` bash
......@@ -22,6 +19,29 @@ Also note that the workspace will be a mixed catkin and cmake workspace. So only
Since catkin libraries will be built as position independent shared libraries by
default, use the `*:shared=True` and `*.fPIC=True` options in conanfile.txt.
# Using cmake_find_package generator
This is what is shown here. The cmake_find_package generator to generate the
findXXX.cmake files. Conan does not modify the CMAKE_PREFIX_PATH which would
disturb the catkin build process. Those targets can be found via find_package()
and later be linked with the built targets.
# Using cmake generator
This is not shown here but I found a way to make it work. Place the following
cide between catkin_package(...) and your first target defenition:
```cmake
if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/v0.13/conan.cmake"
"${CMAKE_BINARY_DIR}/conan.cmake")
endif()
include(${CMAKE_BINARY_DIR}/conan.cmake)
conan_cmake_run(CONANFILE conanfile.txt
BASIC_SETUP
BUILD missing)
```
Then link the targets with ```${CONAN_LIBS}```.
# Requirements
Setup the following conan repositories:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment