2018-11-22 17:48:30 +01:00
|
|
|
cmake_minimum_required(VERSION 2.8.3)
|
|
|
|
project(wlan_pioneer)
|
|
|
|
|
|
|
|
find_package(catkin REQUIRED COMPONENTS
|
|
|
|
roscpp
|
2018-12-11 12:34:35 +01:00
|
|
|
std_msgs
|
2018-11-22 19:48:11 +01:00
|
|
|
message_generation
|
2018-11-22 17:48:30 +01:00
|
|
|
)
|
|
|
|
|
2018-12-16 17:35:47 +01:00
|
|
|
add_message_files(FILES WlanSignalMsg.msg)
|
2018-11-22 17:48:30 +01:00
|
|
|
|
2018-12-16 17:35:47 +01:00
|
|
|
generate_messages(DEPENDENCIES std_msgs)
|
2018-11-22 17:48:30 +01:00
|
|
|
|
2018-12-16 17:35:47 +01:00
|
|
|
catkin_package()
|
2018-11-22 17:48:30 +01:00
|
|
|
|
2018-12-16 17:35:47 +01:00
|
|
|
include_directories(${catkin_INCLUDE_DIRS} /usr/local/include/)
|
|
|
|
link_directories(${catkin_INCLUDE_DIRS} /usr/local/lib/)
|
2018-11-22 17:48:30 +01:00
|
|
|
|
2018-11-22 19:48:11 +01:00
|
|
|
add_executable(wlanSignal src/wlanSignal.cpp)
|
2018-12-13 21:43:05 +01:00
|
|
|
target_link_libraries(wlanSignal ${catkin_LIBRARIES} wifi-scan)
|
|
|
|
add_dependencies(wlanSignal wlan_pioneer_generate_messages_cpp)
|
2018-12-15 15:21:43 +01:00
|
|
|
|
|
|
|
|
2018-12-16 17:35:47 +01:00
|
|
|
# This setting disable new dtags for ld linker. So RUNPATH is
|
|
|
|
# replaced with RPATH in wlanSignal executable. We need RPATH
|
|
|
|
# for finding linked libraries at runtime when executed with
|
|
|
|
# sudo. WLAN scanning needs enhanced privileges. With RUNPATH
|
|
|
|
# linker disables LD_LIBRARY_PATH for security reasons if
|
|
|
|
# setuid/setgid is set. So this is a workaround.
|
|
|
|
# https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling
|
|
|
|
# https://answers.ros.org/question/165246/launch-node-with-root-permissions/
|
2018-12-15 15:21:43 +01:00
|
|
|
SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--disable-new-dtags")
|