FindBZip2: Fix undefined variable BZIP2_LIBRARY
In the FindBzip2.cmake file, the BZip2::BZip2
definition is assigned the IMPORTED_LOCATION property, as shown in the following code snippet, but the ${BZIP2_LIBRARY}
variable is not defined, which will cause a linking error when compiling with BZip2::BZip2
.
if(NOT BZIP2_LIBRARY_RELEASE AND NOT BZIP2_LIBRARY_DEBUG)
set_property(TARGET BZip2::BZip2 APPEND PROPERTY
IMPORTED_LOCATION "${BZIP2_LIBRARY}")
endif()
So I added a line to define BZIP2_LIBRARY
.
set(BZIP2_LIBRARY ${BZIP2_LIBRARIES})