-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#23907) Add all the lzham lib files for msvc builds.
* Add all the lzham lib files for msvc builds. * Update recipes/lzham/all/conanfile.py * lzham: fix handling of static/shared on Windows * lzham: build relocatable shared libraries on macOS --------- Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com>
- Loading branch information
1 parent
d02c31d
commit 257ca31
Showing
2 changed files
with
58 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,13 @@ | ||
#include <cstdlib> | ||
#include <cstring> | ||
#include <string> | ||
#include <iostream> | ||
|
||
#include <lzham_static_lib.h> | ||
#include <lzham.h> | ||
|
||
int main() { | ||
unsigned char in[] = "Hello Conan Center!"; | ||
unsigned char out[sizeof(in)]; | ||
const std::string version(lzham_z_version()); | ||
|
||
lzham_z_stream stream; | ||
std::memset(&stream, 0, sizeof(stream)); | ||
stream.next_in = in; | ||
stream.avail_in = sizeof(in); | ||
stream.next_out = out; | ||
stream.avail_out = sizeof(out); | ||
if (lzham_z_deflateInit(&stream, LZHAM_Z_BEST_COMPRESSION) != LZHAM_Z_OK) | ||
return EXIT_FAILURE; | ||
std::cout << "lzham version: " << version << std::endl; | ||
|
||
if (lzham_z_deflate(&stream, LZHAM_Z_FULL_FLUSH) != LZHAM_Z_OK) | ||
return EXIT_FAILURE; | ||
|
||
return EXIT_SUCCESS; | ||
} |