FindArmadillo: Remove unnecessary setting of ARMADILLO_LIBRARY to empty

This is not a typical pattern for find modules, and it breaks subsequent
calls to `find_package(Armadillo)`.

See also commit 38c6dd7b19 (FindArmadillo: Add support for non-wrapper
case, 2020-03-02, v3.18.0-rc1~594^2) and commit 6745af99c8 (FindArmadillo:
Fix wrapper linking with MSVC, 2025-02-05, v4.0.0-rc1~53^2).
This commit is contained in:
Ryan Curtin
2026-05-01 13:14:29 -04:00
committed by Brad King
parent 096a676d13
commit 3f8daf0f1c

View File

@@ -133,7 +133,7 @@ if(ARMADILLO_INCLUDE_DIR)
set(Armadillo_VERSION_NAME "EARLY RELEASE")
if(EXISTS "${ARMADILLO_INCLUDE_DIR}/armadillo_bits/arma_version.hpp")
# Read and parse armdillo version header file for version number
# Read and parse Armadillo version header file for version number.
file(STRINGS "${ARMADILLO_INCLUDE_DIR}/armadillo_bits/arma_version.hpp" _ARMA_HEADER_CONTENTS REGEX "#define ARMA_VERSION_[A-Z]+ ")
string(REGEX REPLACE ".*#define ARMA_VERSION_MAJOR ([0-9]+).*" "\\1" ARMADILLO_VERSION_MAJOR "${_ARMA_HEADER_CONTENTS}")
string(REGEX REPLACE ".*#define ARMA_VERSION_MINOR ([0-9]+).*" "\\1" ARMADILLO_VERSION_MINOR "${_ARMA_HEADER_CONTENTS}")
@@ -176,8 +176,6 @@ if(_ARMA_USE_WRAPPER)
)
mark_as_advanced(ARMADILLO_LIBRARY)
set(_ARMA_REQUIRED_VARS ARMADILLO_LIBRARY)
else()
set(ARMADILLO_LIBRARY "")
endif()
# Transitive linking with the wrapper does not work with MSVC,