* Try to improve gflags * Try to improve gflags: part 2 * Tried to use dependencies on system * Use nlohmann_jsonConfig from system * Enabled nlohmann_json from system * Improvements * handle system gflags in developer package * Simplifications * Simplify dependency management * Corrected package names * Fixed subgraphsDumper configure stage * Try to fix rhel8 * Try to fix macosx * Fixed VPUX build * Fixed aliasing issues * Suppress some wanrings * export gflags when build it * Fixed some LTO * Try to fix Mac * revert * use gflags as private dependency * Aligned targets in developer package * Fixed frontends tests build on U20 with LTO * PAssed * Don't use pkg_search_module(zlib ..) during cross-compilation * Removed unused variables * Fixed finding of zlib during cross-compilation
57 lines
1.3 KiB
CMake
57 lines
1.3 KiB
CMake
# Copyright (C) 2018-2022 Intel Corporation
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
project(zlib)
|
|
|
|
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996 /W3")
|
|
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /wd4995 /wd4996")
|
|
else()
|
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-all")
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
|
#266: function "XXX" declared implicitly
|
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -diag-disable=266")
|
|
endif()
|
|
endif()
|
|
|
|
set(TARGET_NAME "zlib")
|
|
|
|
set(lib_srcs
|
|
zlib/adler32.c
|
|
zlib/compress.c
|
|
zlib/crc32.c
|
|
zlib/deflate.c
|
|
zlib/gzclose.c
|
|
zlib/gzlib.c
|
|
zlib/gzread.c
|
|
zlib/gzwrite.c
|
|
zlib/inflate.c
|
|
zlib/infback.c
|
|
zlib/inftrees.c
|
|
zlib/inffast.c
|
|
zlib/trees.c
|
|
zlib/uncompr.c
|
|
zlib/zutil.c
|
|
)
|
|
|
|
set(lib_hdrs
|
|
zlib/crc32.h
|
|
zlib/deflate.h
|
|
zlib/gzguts.h
|
|
zlib/inffast.h
|
|
zlib/inffixed.h
|
|
zlib/inflate.h
|
|
zlib/inftrees.h
|
|
zlib/trees.h
|
|
zlib/zutil.h
|
|
)
|
|
|
|
set(lib_ext_hdrs "zlib/zlib.h" "zlib/zconf.h")
|
|
add_library(${TARGET_NAME} STATIC ${lib_srcs} ${lib_hdrs} ${lib_ext_hdrs})
|
|
add_library(${TARGET_NAME}::${TARGET_NAME} ALIAS ${TARGET_NAME})
|
|
|
|
target_include_directories(${TARGET_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/zlib")
|
|
|
|
set_target_properties(zlib PROPERTIES FOLDER thirdparty)
|