1 Star 0 Fork 135

zhubingwei/third_party_zlib_0430

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
huawei_zlib_CMakeList.patch 3.13 KB
一键复制 编辑 原始数据 按行查看 历史
mamingshuai 提交于 2021-03-11 20:36 . update openharmony 1.0.1
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0fe939d..34b6472 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -167,21 +167,21 @@ file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
"\\1" ZLIB_FULL_VERSION ${_zlib_h_contents})
-if(MINGW)
+#if(MINGW)
# This gets us DLL resource information when compiling on MinGW.
- if(NOT CMAKE_RC_COMPILER)
- set(CMAKE_RC_COMPILER windres.exe)
- endif()
-
- add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
- COMMAND ${CMAKE_RC_COMPILER}
- -D GCC_WINDRES
- -I ${CMAKE_CURRENT_SOURCE_DIR}
- -I ${CMAKE_CURRENT_BINARY_DIR}
- -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
- -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
- set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
-endif(MINGW)
+# if(NOT CMAKE_RC_COMPILER)
+# set(CMAKE_RC_COMPILER windres.exe)
+# endif()
+
+# add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
+# COMMAND ${CMAKE_RC_COMPILER}
+# -D GCC_WINDRES
+# -I ${CMAKE_CURRENT_SOURCE_DIR}
+# -I ${CMAKE_CURRENT_BINARY_DIR}
+# -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
+# -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
+# set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
+#endif(MINGW)
add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
@@ -230,20 +230,20 @@ endif()
# Example binaries
#============================================================================
-add_executable(example test/example.c)
-target_link_libraries(example zlib)
-add_test(example example)
+#add_executable(example test/example.c)
+#target_link_libraries(example zlib)
+#add_test(example example)
-add_executable(minigzip test/minigzip.c)
-target_link_libraries(minigzip zlib)
+#add_executable(minigzip test/minigzip.c)
+#target_link_libraries(minigzip zlib)
-if(HAVE_OFF64_T)
- add_executable(example64 test/example.c)
- target_link_libraries(example64 zlib)
- set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
- add_test(example64 example64)
+#if(HAVE_OFF64_T)
+# add_executable(example64 test/example.c)
+# target_link_libraries(example64 zlib)
+# set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
+# add_test(example64 example64)
- add_executable(minigzip64 test/minigzip.c)
- target_link_libraries(minigzip64 zlib)
- set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
-endif()
+# add_executable(minigzip64 test/minigzip.c)
+# target_link_libraries(minigzip64 zlib)
+# set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
+#endif()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhu-bingwei123/third_party_zlib_0430.git
git@gitee.com:zhu-bingwei123/third_party_zlib_0430.git
zhu-bingwei123
third_party_zlib_0430
third_party_zlib_0430
master

搜索帮助