Use IMPORTED_LOCATION for zlib
This commit is contained in:
parent
58c7b0f52e
commit
289a002b6d
3 changed files with 24 additions and 10 deletions
2
external/qt/CMakeLists.txt
vendored
2
external/qt/CMakeLists.txt
vendored
|
|
@ -260,6 +260,7 @@ else()
|
||||||
$<TARGET_FILE:desktop-app::external_openssl_crypto>
|
$<TARGET_FILE:desktop-app::external_openssl_crypto>
|
||||||
desktop-app::external_jpeg
|
desktop-app::external_jpeg
|
||||||
desktop-app::external_zlib
|
desktop-app::external_zlib
|
||||||
|
$<TARGET_FILE:desktop-app::external_zlib>
|
||||||
)
|
)
|
||||||
|
|
||||||
if (LINUX)
|
if (LINUX)
|
||||||
|
|
@ -288,7 +289,6 @@ else()
|
||||||
xcb-util
|
xcb-util
|
||||||
xcb-render-util
|
xcb-render-util
|
||||||
xcb-keysyms
|
xcb-keysyms
|
||||||
z
|
|
||||||
)
|
)
|
||||||
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||||
target_link_libraries(external_qt
|
target_link_libraries(external_qt
|
||||||
|
|
|
||||||
2
external/qt/qt6/CMakeLists.txt
vendored
2
external/qt/qt6/CMakeLists.txt
vendored
|
|
@ -236,6 +236,7 @@ else()
|
||||||
$<TARGET_FILE:desktop-app::external_openssl_crypto>
|
$<TARGET_FILE:desktop-app::external_openssl_crypto>
|
||||||
desktop-app::external_jpeg
|
desktop-app::external_jpeg
|
||||||
desktop-app::external_zlib
|
desktop-app::external_zlib
|
||||||
|
$<TARGET_FILE:desktop-app::external_zlib>
|
||||||
)
|
)
|
||||||
|
|
||||||
if (LINUX)
|
if (LINUX)
|
||||||
|
|
@ -263,7 +264,6 @@ else()
|
||||||
xcb-util
|
xcb-util
|
||||||
xcb-render-util
|
xcb-render-util
|
||||||
xcb-keysyms
|
xcb-keysyms
|
||||||
z
|
|
||||||
)
|
)
|
||||||
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||||
target_link_libraries(external_qt
|
target_link_libraries(external_qt
|
||||||
|
|
|
||||||
30
external/zlib/CMakeLists.txt
vendored
30
external/zlib/CMakeLists.txt
vendored
|
|
@ -4,13 +4,19 @@
|
||||||
# For license and copyright information please follow this link:
|
# For license and copyright information please follow this link:
|
||||||
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||||
|
|
||||||
add_library(external_zlib INTERFACE IMPORTED GLOBAL)
|
|
||||||
add_library(desktop-app::external_zlib ALIAS external_zlib)
|
|
||||||
|
|
||||||
if (DESKTOP_APP_USE_PACKAGED)
|
if (DESKTOP_APP_USE_PACKAGED)
|
||||||
|
add_library(external_zlib INTERFACE IMPORTED GLOBAL)
|
||||||
|
add_library(desktop-app::external_zlib ALIAS external_zlib)
|
||||||
|
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
target_link_libraries(external_zlib INTERFACE ZLIB::ZLIB)
|
target_link_libraries(external_zlib INTERFACE ZLIB::ZLIB)
|
||||||
elseif (WIN32)
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_library(external_zlib STATIC IMPORTED GLOBAL)
|
||||||
|
add_library(desktop-app::external_zlib ALIAS external_zlib)
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
target_compile_definitions(external_zlib INTERFACE ZLIB_WINAPI)
|
target_compile_definitions(external_zlib INTERFACE ZLIB_WINAPI)
|
||||||
target_include_directories(external_zlib SYSTEM INTERFACE ${libs_loc}/zlib)
|
target_include_directories(external_zlib SYSTEM INTERFACE ${libs_loc}/zlib)
|
||||||
if (build_win64)
|
if (build_win64)
|
||||||
|
|
@ -18,10 +24,18 @@ elseif (WIN32)
|
||||||
else()
|
else()
|
||||||
set(zlib_config_folder x86)
|
set(zlib_config_folder x86)
|
||||||
endif()
|
endif()
|
||||||
set(zlib_lib_loc ${libs_loc}/zlib/contrib/vstudio/vc14/${zlib_config_folder}/ZlibStat$<IF:$<CONFIG:Debug>,Debug,ReleaseWithoutAsm>)
|
set(zlib_lib_loc ${libs_loc}/zlib/contrib/vstudio/vc14/${zlib_config_folder})
|
||||||
target_link_libraries(external_zlib INTERFACE ${zlib_lib_loc}/zlibstat.lib)
|
set_target_properties(external_zlib PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${zlib_lib_loc}/ZlibStatReleaseWitoutAsm/zlibstat.lib"
|
||||||
|
IMPORTED_LOCATION_DEBUG "${zlib_lib_loc}/ZlibStatDebug/zlibstat.lib"
|
||||||
|
)
|
||||||
elseif (APPLE)
|
elseif (APPLE)
|
||||||
target_link_libraries(external_zlib INTERFACE ${libs_loc}/local/lib/libz.a)
|
set_target_properties(external_zlib PROPERTIES
|
||||||
|
IMPORTED_LOCATION ${libs_loc}/local/lib/libz.a
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
target_link_static_libraries(external_zlib INTERFACE z)
|
find_library(ZLIB_LIBRARY libz.a REQUIRED)
|
||||||
|
set_target_properties(external_zlib PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${ZLIB_LIBRARY}"
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue