apply patches

This commit is contained in:
openKylinBot 2022-05-14 03:24:07 +08:00
commit 464156d0ba
3 changed files with 12 additions and 2 deletions

View File

@ -7,7 +7,7 @@ if (CMAKE_COMPILER_IS_GNUCC)
# SET(CMAKE_CXX_FLAGS "-D NDEBUG -O3 -Wall -Wextra -pedantic -fvisibility=hidden -fomit-frame-pointer -momit-leaf-frame-pointer -fweb -ftracer" )
# Define GNU C++ defines for both Debug and Release
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wextra")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
# Define specific Debug settings.
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")
@ -46,6 +46,7 @@ set (CHARLS_LIB_MINOR_VERSION 0)
set_target_properties(CharLS PROPERTIES
VERSION ${CHARLS_LIB_MAJOR_VERSION}.${CHARLS_LIB_MINOR_VERSION}
SOVERSION ${CHARLS_LIB_MAJOR_VERSION})
set_property(TARGET CharLS PROPERTY LINK_FLAGS "-Wl,--version-script=../exports.version")
install (TARGETS CharLS RUNTIME DESTINATION bin
LIBRARY DESTINATION lib${LIB_SUFFIX}

9
exports.version Normal file
View File

@ -0,0 +1,9 @@
{
global:
JpegLs*;
extern "C++" {
JpegLs*;
};
local:
*;
};

View File

@ -15,7 +15,7 @@
// Non-windows (static linking)
#if !defined(CHARLS_IMEXPORT) && !defined(_WIN32)
# define CHARLS_IMEXPORT(returntype) returntype
# define CHARLS_IMEXPORT(returntype) __attribute__ ((visibility ("default"))) returntype
#endif
// Windows static linking