Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 669 Bytes

cmake.rst

File metadata and controls

19 lines (12 loc) · 669 Bytes

Building programs using Khiva with CMake

In order to build a program using the Khiva library with the CMake build system you need just a couple of lines in your CmakeLists.txt:

cmake_minimum_required(VERSION 3.1)
project(example)

find_package(Khiva REQUIRED)

add_executable(example example.cpp)
target_link_libraries(example Khiva::khiva)

find_package(Khiva REQUIRED) may be used when Khiva was installed system wide. Please follow the installation instructions for your operating system contained at the chapter-gettingstarted.