安装
按照官网上的步骤在linux编译后,安装的默认目录在/usr/local/include和/usr/local/lib目录。
使用shark库时,将CMakeLists.txt放在工程目录下,执行
cmake .
make
CMakeLists.txt的内容为:
cmake_minimum_required(VERSION 2.8)
project(ExampleProject)
#
Find the Shark libraries and includes
#
set Shark_DIR to the proper location of Shark
find_package(Shark REQUIRED)
include(${SHARK_USE_FILE})
#
Executable
add_executable(ExampleProject HelloWorld.cpp)
target_link_libraries(ExampleProject ${SHARK_LIBRARIES})