Commit 9103930b authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

finding processors to compile publishers

parent 99e51b3c
......@@ -20,10 +20,6 @@ find_package(catkin REQUIRED COMPONENTS
## System dependencies are found with CMake's conventions
find_package(wolfcore REQUIRED)
find_package(wolflaser REQUIRED)
#find_package(falkolib QUIET)
#find_package(PkgConfig)
#pkg_check_modules(csm QUIET csm)
# link_directories(${csm_LIBRARY_DIRS})
# produces the XXXConfig.cmake file among other things
catkin_package(
......@@ -40,10 +36,6 @@ include_directories(
${catkin_INCLUDE_DIRS}
)
# Bad -> should be removed eventually
# INCLUDE_DIRECTORIES("${falkolib_INCLUDE_DIRS}")
# INCLUDE_DIRECTORIES("${csm_INCLUDE_DIRS}")
add_library(publisher_${PROJECT_NAME}
${CMAKE_CURRENT_SOURCE_DIR}/src/publisher_laser_map.cpp
)
......@@ -51,16 +43,36 @@ add_library(subscriber_${PROJECT_NAME}
${CMAKE_CURRENT_SOURCE_DIR}/src/subscriber_laser2d.cpp
)
find_file(FALKO laser/processor/processor_loop_cosure_falko.h wolflaser_INCLUDE_DIRS)
get_target_property(wolflaser_INCLUDE_DIRS wolflaser INTERFACE_INCLUDE_DIRECTORIES)
message("wolflaser_INCLUDE_DIRS: ${wolflaser_INCLUDE_DIRS}")
find_file(FALKO processor_loop_cosure_falko.h PATHS wolflaser_INCLUDE_DIRS PATH_SUFFIXES laser/processor /laser/processor laser/processor/ /laser/processor/ NO_DEFAULT_PATH)
find_file(ICP laser/processor/processor_odom_icp.h PATHS wolflaser_INCLUDE_DIRS NO_DEFAULT_PATH)
message("FALKO: ${FALKO}")
if (NOT FALKO-NOTFOUND)
message("NOT FALKO-NOTFOUND")
else()
message("FALKO-NOTFOUND")
endif()
message("ICP: ${ICP}")
if (NOT ICP-NOTFOUND)
message("NOT ICP-NOTFOUND")
else()
message("ICP-NOTFOUND")
endif()
if (FALKO)
message("Found 'processor_loop_cosure_falko.h'. Compiling publisher_falko.")
target_sources(publisher_${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/publisher_falko.cpp)
else()
message("Didn't find 'processor_loop_cosure_falko.h'. Not compiling publisher_falko.")
endif()
find_file(ICP laser/processor/processor_odom_icp.h wolflaser_INCLUDE_DIRS)
if (ICP)
message("Found 'processor_odom_icp.h'. Compiling publisher_odom_icp.")
target_sources(publisher_${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/publisher_odom_icp.cpp)
else()
message("Didn't find 'processor_odom_icp.h'. Not compiling publisher_odom_icp.")
endif ()
## Specify libraries to link a library or executable target against
......
Supports Markdown
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