-
-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
128 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# - Find zstd | ||
# Find the zstd compression library and includes | ||
# | ||
# ZSTD_INCLUDE_DIRS - where to find zstd.h, etc. | ||
# ZSTD_LIBRARIES - List of libraries when using zstd. | ||
# ZSTD_FOUND - True if zstd found. | ||
|
||
find_path(ZSTD_INCLUDE_DIRS | ||
NAMES zstd.h | ||
HINTS ${zstd_ROOT_DIR}/include) | ||
|
||
find_library(ZSTD_LIBRARIES | ||
NAMES zstd | ||
HINTS ${zstd_ROOT_DIR}/lib) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(zstd DEFAULT_MSG ZSTD_LIBRARIES ZSTD_INCLUDE_DIRS) | ||
|
||
mark_as_advanced( | ||
ZSTD_LIBRARIES | ||
ZSTD_INCLUDE_DIRS) | ||
|
||
if(ZSTD_FOUND AND NOT (TARGET zstd::zstd)) | ||
add_library (zstd::zstd UNKNOWN IMPORTED) | ||
set_target_properties(zstd::zstd | ||
PROPERTIES | ||
IMPORTED_LOCATION ${ZSTD_LIBRARIES} | ||
INTERFACE_INCLUDE_DIRECTORIES ${ZSTD_INCLUDE_DIRS}) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule xz
deleted from
238b4e
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#pragma once | ||
|
||
#ifndef _ZSTD_SHARED_API | ||
#define _ZSTD_SHARED_API | ||
#endif | ||
|
||
#include <image/MemoryBuffer.h> | ||
|
||
_ZSTD_SHARED_API const char* DecompressZSTD(size_t downloadedDataSize, const uint8_t* downloadedData, const char* fileName); | ||
_ZSTD_SHARED_API const char* DecompressZSTD(size_t downloadedDataSize, const uint8_t* downloadedData, uint8_t* dest, int destSeek, int destSize); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Define the current source locations | ||
|
||
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/utils-zstd) | ||
SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/sources/utils-zstd) | ||
|
||
FILE ( GLOB_RECURSE utils_zstd_SOURCES "${CURRENT_HEADER_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.cpp" ) | ||
|
||
if (USE_SHARED_LIBS) | ||
add_library(utils-zstd SHARED ${utils_zstd_SOURCES}) | ||
if(WIN32) | ||
target_compile_definitions(utils-zstd | ||
INTERFACE | ||
"_ZSTD_SHARED_API=__declspec(dllimport)" | ||
PRIVATE | ||
"_ZSTD_SHARED_API=__declspec(dllexport)" | ||
) | ||
else() | ||
target_compile_definitions(utils-zstd | ||
INTERFACE | ||
"_ZSTD_SHARED_API=__attribute__((visibility(\"default\")))" | ||
) | ||
endif() | ||
install( | ||
TARGETS utils-zstd | ||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
) | ||
else() | ||
add_library(utils-zstd STATIC ${utils_zstd_SOURCES}) | ||
endif() | ||
|
||
target_link_libraries(utils-zstd PRIVATE zstd::zstd) | ||
target_include_directories(utils-zstd PRIVATE zstd::zstd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters