FindArmadillo¶
Finds the Armadillo C++ library. Armadillo is a library for linear algebra and scientific computing.
Added in version 3.18: Support for linking wrapped libraries directly (see the
ARMA_DONT_USE_WRAPPER
preprocessor macro that needs to be defined before
including the <armadillo>
header).
Result Variables¶
This module sets the following variables:
Armadillo_FOUND
Set to true if the library is found. For backward compatibility, the
ARMADILLO_FOUND
variable is also set to the same value.ARMADILLO_INCLUDE_DIRS
List of required include directories.
ARMADILLO_LIBRARIES
List of libraries to be linked.
ARMADILLO_VERSION_STRING
Version as a string (ex:
1.0.4
).ARMADILLO_VERSION_MAJOR
Major version number.
ARMADILLO_VERSION_MINOR
Minor version number.
ARMADILLO_VERSION_PATCH
Patch version number.
ARMADILLO_VERSION_NAME
Name of the version (ex:
Antipodean Antileech
).
Examples¶
Using Armadillo:
find_package(Armadillo REQUIRED)
if(Armadillo_FOUND AND NOT TARGET Armadillo::Armadillo)
add_library(Armadillo::Armadillo INTERFACE IMPORTED)
set_target_properties(
Armadillo::Armadillo
PROPERTIES
INTERFACE_LINK_LIBRARIES "${ARMADILLO_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${ARMADILLO_INCLUDE_DIRS}"
)
endif()
add_executable(foo foo.cc)
target_link_libraries(foo PRIVATE Armadillo::Armadillo)