-
Notifications
You must be signed in to change notification settings - Fork 0
/
BZip2Config.cmake.in
33 lines (25 loc) · 1.08 KB
/
BZip2Config.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
@PACKAGE_INIT@
set(BZIP2_INCLUDE_DIRS @PACKAGE_CMAKE_INSTALL_INCLUDEDIR@)
set(BZIP2_VERSION_STRING "@BZIP2_VERSION_STRING@")
include("${CMAKE_CURRENT_LIST_DIR}/BZip2Targets.cmake")
### This macro will emulate the "find_library" call in FindBZip2.cmake ###
macro(_BZIP2_GET_IMPORTED_LIBRARIES)
get_target_property(_BZIP2_IMPORTED_CONFIGS BZip2::bz2 IMPORTED_CONFIGURATIONS)
foreach(_BZIP2_IMPORTED_CONFIG IN LISTS _BZIP2_IMPORTED_CONFIGS)
get_target_property(BZIP2_LIBRARY_${_BZIP2_IMPORTED_CONFIG} BZip2::bz2 IMPORTED_LOCATION_${_BZIP2_IMPORTED_CONFIG})
endforeach()
unset(_BZIP2_IMPORTED_CONFIG)
unset(_BZIP2_IMPORTED_CONFIGS)
include(SelectLibraryConfigurations)
select_library_configurations(BZIP2)
endmacro()
_BZIP2_GET_IMPORTED_LIBRARIES()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BZip2 REQUIRED_VARS BZIP2_LIBRARY BZIP2_INCLUDE_DIRS
VERSION_VAR BZIP2_VERSION_STRING)
if(BZIP2_FOUND)
add_library(BZip2::BZip2 ALIAS BZip2::bz2)
if(NOT BZIP2_LIBRARIES)
set(BZIP2_LIBRARIES ${BZIP2_LIBRARY})
endif()
endif()