I'm trying to use libtidy in my C project . I build tidy code and get *.so file. when I try to link this file to my project by cmake, receive following error message :
CMake Error at CMakeLists.txt:8 (TARGET_LINK_LIBRARIES):
Cannot specify link libraries for target "GLBall" which is not built by
this project.
-- Configuring incomplete, errors occurred!
See also "/root/isefa/build/CMakeFiles/CMakeOutput.log".
and here is my CMakeLists.txt
:
cmake_minimum_required(VERSION 3.0.0)
project(test C CXX)
set(CMAKE_BUILD_TYPE Release)
include_directories(include)
file(GLOB SOURCES "src/*.c")
#add_library (libtidy SHARED /usr/lib)
LINK_DIRECTORIES(/usr/lib/)
TARGET_LINK_LIBRARIES(GLBall libtidy)
add_executable(test ./bin)
install (TARGETS test DESTINATION /usr/lib)