From a7764f84f0dec7c0c485349817f793bf4dff9de5 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 13 Apr 2020 17:42:22 +0400 Subject: [PATCH] Proper usage of pkg-config --- Telegram/cmake/lib_tgvoip.cmake | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Telegram/cmake/lib_tgvoip.cmake b/Telegram/cmake/lib_tgvoip.cmake index 215ac732e..cd78cd0a4 100644 --- a/Telegram/cmake/lib_tgvoip.cmake +++ b/Telegram/cmake/lib_tgvoip.cmake @@ -9,10 +9,9 @@ if (TDESKTOP_USE_PACKAGED_TGVOIP) add_library(tdesktop::lib_tgvoip ALIAS lib_tgvoip) find_package(PkgConfig REQUIRED) - pkg_check_modules(TGVOIP REQUIRED tgvoip) + pkg_check_modules(TGVOIP REQUIRED IMPORTED_TARGET tgvoip) - target_include_directories(lib_tgvoip INTERFACE ${TGVOIP_INCLUDE_DIRS}) - target_link_libraries(lib_tgvoip INTERFACE ${TGVOIP_LIBRARIES}) + target_link_libraries(lib_tgvoip INTERFACE PkgConfig::TGVOIP) else() add_library(lib_tgvoip STATIC) init_target(lib_tgvoip) @@ -779,10 +778,6 @@ else() ) endif() - if (NOT WIN32) - target_compile_definitions(lib_tgvoip PRIVATE TGVOIP_USE_INSTALLED_OPUS) - endif() - target_include_directories(lib_tgvoip PUBLIC ${tgvoip_loc}