mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 16:58:58 +08:00
23 lines
739 B
CMake
23 lines
739 B
CMake
|
|
||
|
get_filename_component(_unrar_root "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||
|
get_filename_component(_unrar_root "${_unrar_root}" PATH)
|
||
|
get_filename_component(_unrar_root "${_unrar_root}" PATH)
|
||
|
|
||
|
set(_unrar_lib "${_unrar_root}/lib/unrar.lib")
|
||
|
if (EXISTS "${_unrar_lib}")
|
||
|
|
||
|
add_library(unofficial::unrar::unrar INTERFACE IMPORTED)
|
||
|
set_target_properties(unofficial::unrar::unrar PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_unrar_root}/include")
|
||
|
set_target_properties(unofficial::unrar::unrar PROPERTIES IMPORTED_LOCATION "${_unrar_lib}")
|
||
|
set_property(TARGET unofficial::unrar::unrar APPEND PROPERTY IMPORTED_CONFIGURATIONS)
|
||
|
set(unrar_FOUND TRUE)
|
||
|
|
||
|
else()
|
||
|
|
||
|
set(unrar_FOUND FALSE)
|
||
|
|
||
|
endif()
|
||
|
unset(_unrar_lib)
|
||
|
|
||
|
unset(_unrar_root)
|