c++ - Link External Library when using CMakeLists used by CLion -
i have build libmemcached.a , copied /usr/local/lib on mac , have tried following options link libmemcached.a , yet compile time errors libmemcached/memcached.h not found.
link_libraries (${libmemcached}) include_directories(system ${libmemcached}) link_directories("/usr/local/lib") find_package(libmemcached.a required) link_libraries`enter code here`(libmemcached.a) find_library(result libmemcached.a paths /usr/local/lib) target_link_libraries(dnsa_pcl libmemcached.a)
it simple -l -l using makefile. not sure needs done make work using cmakelists. appreciated.
you should use called imported library, it's described in official documentation
Comments
Post a Comment