Distribution_Service/CC_SDK/Environment/libdatachannel/cmake/Modules/FindLibJuice.cmake
2025-11-11 17:46:19 +08:00

18 lines
643 B
CMake

if (NOT TARGET LibJuice::LibJuice)
find_path(JUICE_INCLUDE_DIR juice/juice.h)
find_library(JUICE_LIBRARY NAMES juice)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibJuice DEFAULT_MSG JUICE_LIBRARY JUICE_INCLUDE_DIR)
if (LibJuice_FOUND)
add_library(LibJuice::LibJuice UNKNOWN IMPORTED)
set_target_properties(LibJuice::LibJuice PROPERTIES
IMPORTED_LOCATION "${JUICE_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${JUICE_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${JUICE_LIBRARIES}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C")
endif ()
endif ()