Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mathis Rosenhauer
libaec
Commits
0c7c88e6
Unverified
Commit
0c7c88e6
authored
Jan 29, 2020
by
Brennan Ashton
Committed by
GitHub
Jan 29, 2020
Browse files
Fix static library builds (#13)
Signed-off-by:
Brennan Ashton
<
bashton@brennanashton.com
>
parent
0c0453a0
Changes
4
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
0c7c88e6
...
...
@@ -43,9 +43,6 @@ option(BUILD_SHARED_LIBS "Build Shared Libraries" ON)
if
(
BUILD_SHARED_LIBS
)
set
(
LIB_TYPE SHARED
)
else
(
BUILD_SHARED_LIBS
)
if
(
WIN32
)
message
(
WARNING
"You will have to modify libaec.h for static libs."
)
endif
(
WIN32
)
set
(
LIB_TYPE STATIC
)
endif
(
BUILD_SHARED_LIBS
)
...
...
src/CMakeLists.txt
View file @
0c7c88e6
include
(
GenerateExportHeader
)
add_library
(
aec
${
LIB_TYPE
}
${
libaec_SRCS
}
)
set_target_properties
(
aec PROPERTIES VERSION 0.0.10 SOVERSION 0
)
generate_export_header
(
aec
BASE_NAME libaec
EXPORT_MACRO_NAME libaec_EXPORT
EXPORT_FILE_NAME
${
PROJECT_BINARY_DIR
}
/libaec_Export.h
STATIC_DEFINE libaec_BUILT_AS_STATIC
)
add_library
(
sz
${
LIB_TYPE
}
sz_compat.c
)
set_target_properties
(
sz PROPERTIES VERSION 2.0.1 SOVERSION 2
)
...
...
@@ -41,7 +49,7 @@ else(WIN32)
DESTINATION
${
CMAKE_INSTALL_FULL_MANDIR
}
/man1 COMPONENT doc
)
endif
(
WIN32
)
install
(
FILES libaec.h szlib.h
install
(
FILES libaec.h szlib.h
${
PROJECT_BINARY_DIR
}
/libaec_Export.h
DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
COMPONENT headers
)
install
(
TARGETS aec_client
...
...
src/libaec.h
View file @
0c7c88e6
...
...
@@ -52,20 +52,12 @@
#include <stddef.h>
#include "libaec_Export.h"
#ifdef __cplusplus
extern
"C"
{
#endif
#if BUILDING_LIBAEC && HAVE_VISIBILITY
# define LIBAEC_DLL_EXPORTED __attribute__((__visibility__("default")))
#elif BUILDING_LIBAEC && defined _MSC_VER
# define LIBAEC_DLL_EXPORTED __declspec(dllexport)
#elif defined _MSC_VER
# define LIBAEC_DLL_EXPORTED __declspec(dllimport)
#else
# define LIBAEC_DLL_EXPORTED
#endif
struct
internal_state
;
struct
aec_stream
{
...
...
@@ -155,19 +147,19 @@ struct aec_stream {
/*********************************************/
/* Streaming encoding and decoding functions */
/*********************************************/
LIBAEC_DLL
_EXPORT
ED
int
aec_encode_init
(
struct
aec_stream
*
strm
);
LIBAEC_DLL
_EXPORT
ED
int
aec_encode
(
struct
aec_stream
*
strm
,
int
flush
);
LIBAEC_DLL
_EXPORT
ED
int
aec_encode_end
(
struct
aec_stream
*
strm
);
libaec
_EXPORT
int
aec_encode_init
(
struct
aec_stream
*
strm
);
libaec
_EXPORT
int
aec_encode
(
struct
aec_stream
*
strm
,
int
flush
);
libaec
_EXPORT
int
aec_encode_end
(
struct
aec_stream
*
strm
);
LIBAEC_DLL
_EXPORT
ED
int
aec_decode_init
(
struct
aec_stream
*
strm
);
LIBAEC_DLL
_EXPORT
ED
int
aec_decode
(
struct
aec_stream
*
strm
,
int
flush
);
LIBAEC_DLL
_EXPORT
ED
int
aec_decode_end
(
struct
aec_stream
*
strm
);
libaec
_EXPORT
int
aec_decode_init
(
struct
aec_stream
*
strm
);
libaec
_EXPORT
int
aec_decode
(
struct
aec_stream
*
strm
,
int
flush
);
libaec
_EXPORT
int
aec_decode_end
(
struct
aec_stream
*
strm
);
/***************************************************************/
/* Utility functions for encoding or decoding a memory buffer. */
/***************************************************************/
LIBAEC_DLL
_EXPORT
ED
int
aec_buffer_encode
(
struct
aec_stream
*
strm
);
LIBAEC_DLL
_EXPORT
ED
int
aec_buffer_decode
(
struct
aec_stream
*
strm
);
libaec
_EXPORT
int
aec_buffer_encode
(
struct
aec_stream
*
strm
);
libaec
_EXPORT
int
aec_buffer_decode
(
struct
aec_stream
*
strm
);
#ifdef __cplusplus
}
...
...
src/szlib.h
View file @
0c7c88e6
...
...
@@ -80,15 +80,15 @@ typedef struct SZ_com_t_s
int
pixels_per_scanline
;
}
SZ_com_t
;
LIBAEC_DLL
_EXPORT
ED
int
SZ_BufftoBuffCompress
(
libaec
_EXPORT
int
SZ_BufftoBuffCompress
(
void
*
dest
,
size_t
*
destLen
,
const
void
*
source
,
size_t
sourceLen
,
SZ_com_t
*
param
);
LIBAEC_DLL
_EXPORT
ED
int
SZ_BufftoBuffDecompress
(
libaec
_EXPORT
int
SZ_BufftoBuffDecompress
(
void
*
dest
,
size_t
*
destLen
,
const
void
*
source
,
size_t
sourceLen
,
SZ_com_t
*
param
);
LIBAEC_DLL
_EXPORT
ED
int
SZ_encoder_enabled
(
void
);
libaec
_EXPORT
int
SZ_encoder_enabled
(
void
);
#endif
/* SZLIB_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment