安裝
按照官網上的步驟在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})