From 917f3d69ba320038bfd172cb5d08647f635655e7 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Wed, 14 Oct 2020 13:40:15 +0400 Subject: [PATCH] Add opus and zlib source directoies as include directories only on Windows --- external/opus/CMakeLists.txt | 10 ++++------ external/zlib/CMakeLists.txt | 10 +--------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/external/opus/CMakeLists.txt b/external/opus/CMakeLists.txt index 60a01c5..4b452e5 100644 --- a/external/opus/CMakeLists.txt +++ b/external/opus/CMakeLists.txt @@ -16,14 +16,12 @@ else() add_library(external_opus STATIC IMPORTED GLOBAL) add_library(desktop-app::external_opus ALIAS external_opus) - target_include_directories(external_opus SYSTEM - INTERFACE - ${libs_loc}/opus/include - ) - if (WIN32) + target_include_directories(external_opus + INTERFACE + ${libs_loc}/opus/include + ) set(opus_lib_loc ${libs_loc}/opus/win32/VS2015/Win32) - set_target_properties(external_opus PROPERTIES IMPORTED_LOCATION "${opus_lib_loc}/Release/opus.lib" IMPORTED_LOCATION_DEBUG "${opus_lib_loc}/Debug/opus.lib" diff --git a/external/zlib/CMakeLists.txt b/external/zlib/CMakeLists.txt index 0389c0d..34e4874 100644 --- a/external/zlib/CMakeLists.txt +++ b/external/zlib/CMakeLists.txt @@ -7,21 +7,13 @@ add_library(external_zlib INTERFACE IMPORTED GLOBAL) add_library(desktop-app::external_zlib ALIAS external_zlib) -if (NOT DESKTOP_APP_USE_PACKAGED AND NOT LINUX) - target_include_directories(external_zlib SYSTEM - INTERFACE - ${libs_loc}/zlib - ) -endif() - if (DESKTOP_APP_USE_PACKAGED) find_package(ZLIB REQUIRED) target_link_libraries(external_zlib INTERFACE ZLIB::ZLIB) elseif (WIN32) target_compile_definitions(external_zlib INTERFACE ZLIB_WINAPI) - + target_include_directories(external_zlib INTERFACE ${libs_loc}/zlib) set(zlib_lib_loc ${libs_loc}/zlib/contrib/vstudio/vc14/x86/ZlibStat$,Debug,ReleaseWithoutAsm>) - target_link_libraries(external_zlib INTERFACE ${zlib_lib_loc}/zlibstat.lib) elseif (APPLE AND NOT build_osx) target_link_libraries(external_zlib INTERFACE /usr/local/macos/lib/libz.a)