diff --git a/CMakeLists.txt b/CMakeLists.txt index 0247cac4..79ac10df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ if(WIN32) cmake_policy(SET CMP0074 NEW) endif(WIN32) project(rs_driver VERSION 1.3.0) +add_library(rs_driver INTERFACE) #============================= # Compile Demos&Tools @@ -83,6 +84,7 @@ endif(WIN32) find_package(Boost COMPONENTS system date_time regex REQUIRED) include_directories(${Boost_INCLUDE_DIRS}) +target_include_directories(${PROJECT_NAME} INTERFACE ${Boost_INCLUDE_DIRS}) list(APPEND EXTERNAL_LIBS ${Boost_LIBRARIES}) #======================== @@ -92,6 +94,7 @@ if(WIN32) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) find_package(PCAP REQUIRED) include_directories(${PCAP_INCLUDE_DIR}) + target_include_directories(${PROJECT_NAME} INTERFACE ${PCAP_INCLUDE_DIR}) list(APPEND EXTERNAL_LIBS ${PCAP_LIBRARY}) else() list(APPEND EXTERNAL_LIBS pcap) @@ -104,6 +107,7 @@ if(${ENABLE_TRANSFORM}) add_definitions("-DENABLE_TRANSFORM") find_package(Eigen3 REQUIRED) include_directories(${EIGEN3_INCLUDE_DIR}) + target_include_directories(${PROJECT_NAME} INTERFACE ${EIGEN3_INCLUDE_DIR}) message(=============================================================) message("-- Enable Transform Fcuntions") message(=============================================================) @@ -165,4 +169,4 @@ if(UNIX AND ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) endif(NOT TARGET uninstall) -endif(UNIX AND ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file +endif(UNIX AND ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/rs_driver/driver/decoder/decoder_factory.hpp b/src/rs_driver/driver/decoder/decoder_factory.hpp index 5a7d1214..9dca51fe 100644 --- a/src/rs_driver/driver/decoder/decoder_factory.hpp +++ b/src/rs_driver/driver/decoder/decoder_factory.hpp @@ -51,7 +51,7 @@ class DecoderFactory ~DecoderFactory() = default; static std::shared_ptr> createDecoder(const RSDriverParam& param); -private: +public: static const LidarConstantParameter getRS16ConstantParam(); static const LidarConstantParameter getRS32ConstantParam(); static const LidarConstantParameter getRSBPConstantParam();