Skip to content

ROS Noetic, CMake could not find Fiels2Cover package #127

Open

Description

@ebnerluca

On Ubuntu 20.04, I am trying to build a ROS package (Noetic) which uses the fields2cover library.

To do so, I cloned the ortools_vendor and this repo here on main (commit c2957f4).
I can successfully build the lib with catkin: catkin build fields2cover.

However, when I try to include f2c in my own package, it fails in CMakeLists.txt at find_package.

My CMakeLists:

cmake_minimum_required(VERSION 3.0.2)
project(f2c_tutorials)

find_package(catkin REQUIRED COMPONENTS
    Fields2Cover)

catkin_package()

add_executable(tutorial src/tutorial.cpp)
target_link_libraries(tutorials ${catkin_LIBRARIES} Fields2Cover)

The error is:

Could not find a package configuration file provided by "Fields2Cover" with
  any of the following names:

    Fields2CoverConfig.cmake
    fields2cover-config.cmake

  Add the installation prefix of "Fields2Cover" to CMAKE_PREFIX_PATH or set
  "Fields2Cover_DIR" to a directory containing one of the above files.  If
  "Fields2Cover" provides a separate development package or SDK, be sure it
  has been installed.

How do I set install prefixes etc. correctly in order to find the f2c library?
(It works fine if I build and install fields2cover via make and make install first and then catkin build, but I'd like to do it via one single catkin build command. Especially since catkin build for fields2cover is supported already)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions