diff --git a/CMakeLists.txt b/CMakeLists.txt index 50b8e9af2cda347713e0b8763067d40feefac75a..2a1f3b9e9f35ca05ec787ae28504cee5f74afc94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,9 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.10) project(wolf_ros_laser) ## Compile as C++14 -add_compile_options(-std=c++14) +add_compile_options(-std=c++14) +# -fPIC and -rdynamic ensure unique singleton instance across shared libraries (for factories) see: https://stackoverflow.com/a/8626922 +SET(CMAKE_CXX_FLAGS "-fPIC -rdynamic") find_package(catkin REQUIRED COMPONENTS roscpp @@ -16,9 +18,6 @@ find_package(catkin REQUIRED COMPONENTS ) ## System dependencies are found with CMake's conventions -# find_package(Boost REQUIRED COMPONENTS system) -# find_package(Ceres REQUIRED) -# find_package(Eigen3 REQUIRED) find_package(wolfcore REQUIRED) find_package(wolflaser REQUIRED) find_package(falkolib QUIET)