mirror of
				https://github.com/eledio-devices/thirdparty-miniz.git
				synced 2025-10-31 16:14:16 +01:00 
			
		
		
		
	Fix for older cmake versions and build of examples.
This commit is contained in:
		| @@ -1,5 +1,12 @@ | |||||||
| PROJECT(miniz C) | cmake_minimum_required(VERSION 3.0) | ||||||
| cmake_minimum_required(VERSION 3.4) |  | ||||||
|  | if(CMAKE_MINOR_VERSION LESS 12) | ||||||
|  |   project(miniz) | ||||||
|  |   # see issue https://gitlab.kitware.com/cmake/cmake/merge_requests/1799 | ||||||
|  | else() | ||||||
|  |   project(miniz C) | ||||||
|  | endif() | ||||||
|  |  | ||||||
|  |  | ||||||
| set(Upstream_VERSION 2.1.0) | set(Upstream_VERSION 2.1.0) | ||||||
|  |  | ||||||
| @@ -81,6 +88,8 @@ else(AMALGAMATE_SOURCES) | |||||||
|     string(TOUPPER ${PROJECT_NAME} PROJECT_UPPER) |     string(TOUPPER ${PROJECT_NAME} PROJECT_UPPER) | ||||||
|     set_target_properties(${PROJECT_NAME} |     set_target_properties(${PROJECT_NAME} | ||||||
|         PROPERTIES INTERFACE_COMPILE_DEFINITIONS ${PROJECT_UPPER}_STATIC_DEFINE) |         PROPERTIES INTERFACE_COMPILE_DEFINITIONS ${PROJECT_UPPER}_STATIC_DEFINE) | ||||||
|  |   else() | ||||||
|  |     set_property(TARGET ${PROJECT_NAME} PROPERTY C_VISIBILITY_PRESET hidden) | ||||||
|   endif() |   endif() | ||||||
|  |  | ||||||
|   set_property(TARGET ${PROJECT_NAME} PROPERTY VERSION ${Upstream_VERSION}) |   set_property(TARGET ${PROJECT_NAME} PROPERTY VERSION ${Upstream_VERSION}) | ||||||
|   | |||||||
							
								
								
									
										10
									
								
								miniz.h
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								miniz.h
									
									
									
									
									
								
							| @@ -112,10 +112,7 @@ | |||||||
| */ | */ | ||||||
| #pragma once | #pragma once | ||||||
|  |  | ||||||
| #include "miniz_common.h" | #include "miniz_export.h" | ||||||
| #include "miniz_tdef.h" |  | ||||||
| #include "miniz_tinfl.h" |  | ||||||
| #include "miniz_zip.h" |  | ||||||
|  |  | ||||||
| /* Defines to completely disable specific portions of miniz.c:  | /* Defines to completely disable specific portions of miniz.c:  | ||||||
|    If all macros here are defined the only functionality remaining will be CRC-32, adler-32, tinfl, and tdefl. */ |    If all macros here are defined the only functionality remaining will be CRC-32, adler-32, tinfl, and tdefl. */ | ||||||
| @@ -476,3 +473,8 @@ typedef void *const voidpc; | |||||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||||
| } | } | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | #include "miniz_common.h" | ||||||
|  | #include "miniz_tdef.h" | ||||||
|  | #include "miniz_tinfl.h" | ||||||
|  | #include "miniz_zip.h" | ||||||
|   | |||||||
| @@ -24,7 +24,6 @@ | |||||||
|  * |  * | ||||||
|  **************************************************************************/ |  **************************************************************************/ | ||||||
|  |  | ||||||
| #include "miniz_tdef.h" |  | ||||||
| #include "miniz.h" | #include "miniz.h" | ||||||
|  |  | ||||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||||
|   | |||||||
| @@ -24,7 +24,7 @@ | |||||||
|  * |  * | ||||||
|  **************************************************************************/ |  **************************************************************************/ | ||||||
|  |  | ||||||
| #include "miniz_tinfl.h" | #include "miniz.h" | ||||||
|  |  | ||||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||||
| extern "C" { | extern "C" { | ||||||
|   | |||||||
| @@ -24,7 +24,7 @@ | |||||||
|  * THE SOFTWARE. |  * THE SOFTWARE. | ||||||
|  * |  * | ||||||
|  **************************************************************************/ |  **************************************************************************/ | ||||||
| #include "miniz_zip.h" | #include "miniz.h" | ||||||
|  |  | ||||||
| #ifndef MINIZ_NO_ARCHIVE_APIS | #ifndef MINIZ_NO_ARCHIVE_APIS | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user