Merge pull request #135 from tamasmeszaros/cmake-dynlib
Add include location tolerance and stop forcing _GNU_SOURCE
This commit is contained in:
commit
e0c964c4a3
@ -64,8 +64,11 @@ if(AMALGAMATE_SOURCES)
|
|||||||
file(WRITE ${CMAKE_BINARY_DIR}/amalgamation/miniz.h "${AMAL_MINIZ_H}")
|
file(WRITE ${CMAKE_BINARY_DIR}/amalgamation/miniz.h "${AMAL_MINIZ_H}")
|
||||||
add_library(${PROJECT_NAME} INTERFACE)
|
add_library(${PROJECT_NAME} INTERFACE)
|
||||||
|
|
||||||
target_compile_definitions(${PROJECT_NAME}
|
# Might not be a good idea to force this on the library user
|
||||||
INTERFACE $<$<C_COMPILER_ID:GNU>:_GNU_SOURCE>)
|
# as it could bloat the global namespace
|
||||||
|
# https://github.com/libevent/libevent/issues/460
|
||||||
|
# target_compile_definitions(${PROJECT_NAME}
|
||||||
|
# INTERFACE $<$<C_COMPILER_ID:GNU>:_GNU_SOURCE>)
|
||||||
|
|
||||||
set_property(TARGET ${PROJECT_NAME} APPEND
|
set_property(TARGET ${PROJECT_NAME} APPEND
|
||||||
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||||
@ -131,7 +134,8 @@ install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Targets
|
|||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION lib
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION lib
|
||||||
INCLUDES DESTINATION include
|
# users can use <miniz.h> or <miniz/miniz.h>
|
||||||
|
INCLUDES DESTINATION include include/${PROJECT_NAME}
|
||||||
)
|
)
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
|
|||||||
@ -210,7 +210,7 @@ MINIZ_EXPORT mz_bool mz_zip_reader_init_file(mz_zip_archive *pZip, const char *p
|
|||||||
MINIZ_EXPORT mz_bool mz_zip_reader_init_file_v2(mz_zip_archive *pZip, const char *pFilename, mz_uint flags, mz_uint64 file_start_ofs, mz_uint64 archive_size);
|
MINIZ_EXPORT mz_bool mz_zip_reader_init_file_v2(mz_zip_archive *pZip, const char *pFilename, mz_uint flags, mz_uint64 file_start_ofs, mz_uint64 archive_size);
|
||||||
|
|
||||||
/* Read an archive from an already opened FILE, beginning at the current file position. */
|
/* Read an archive from an already opened FILE, beginning at the current file position. */
|
||||||
/* The archive is assumed to be archive_size bytes long. If archive_size is < 0, then the entire rest of the file is assumed to contain the archive. */
|
/* The archive is assumed to be archive_size bytes long. If archive_size is 0, then the entire rest of the file is assumed to contain the archive. */
|
||||||
/* The FILE will NOT be closed when mz_zip_reader_end() is called. */
|
/* The FILE will NOT be closed when mz_zip_reader_end() is called. */
|
||||||
MINIZ_EXPORT mz_bool mz_zip_reader_init_cfile(mz_zip_archive *pZip, MZ_FILE *pFile, mz_uint64 archive_size, mz_uint flags);
|
MINIZ_EXPORT mz_bool mz_zip_reader_init_cfile(mz_zip_archive *pZip, MZ_FILE *pFile, mz_uint64 archive_size, mz_uint flags);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user