Add opus and zlib source directoies as include directories only on Windows
This commit is contained in:
parent
001c41a6be
commit
917f3d69ba
2 changed files with 5 additions and 15 deletions
10
external/opus/CMakeLists.txt
vendored
10
external/opus/CMakeLists.txt
vendored
|
|
@ -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"
|
||||
|
|
|
|||
10
external/zlib/CMakeLists.txt
vendored
10
external/zlib/CMakeLists.txt
vendored
|
|
@ -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$<IF:$<CONFIG:Debug>,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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue