How to use Fuzzylite on my workspace via CMakeLists?
I try to study and I found that It can add libraries for fuzzylite in CMakeLists.txt on my workspace.
I try to use executable and target_link_libraries of Fuzzylite on "CMakeLists.txt" on my workspace. I still found an error after "catkin_make". Please see my code and error below.
My code:
add_executable(fuzzylite src/fuzzylite.cpp)
add_library(main src/main.cpp)
target_link_libraries(fuzzylite main)
error:
CMake Error at CMakeLists.txt:62 (add_executable): Cannot find source file:
src/fuzzylite.cpp
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx
CMake Error: CMake can not determine linker language for target: main CMake Error: Cannot determine link language for target "main". CMake Error: CMake can not determine linker language for target: fuzzylite CMake Error: Cannot determine link language for target "fuzzylite". -- Generating done -- Build files have been written to: /home/chucolate/chu_ws/build Makefile:822: recipe for target 'cmake_check_build_system' failed make: * [cmake_check_build_system] Error 1 Invoking "make cmake_check_build_system" failed
Do you have any suggestions about this? I just want to use Fuzzylite for obstacle avoidance on my robot workspace.
Thank you.