]> git.pld-linux.org Git - packages/CharLS.git/blame - CharLS-add_sharedlib_soname.patch
- new; patches taken from Fedora
[packages/CharLS.git] / CharLS-add_sharedlib_soname.patch
CommitLineData
f9f53625
JB
1diff --git a/CMakeLists.txt b/CMakeLists.txt
2index 88f0949..c57ef72 100644
3--- a/CMakeLists.txt
4+++ b/CMakeLists.txt
5@@ -20,8 +20,21 @@ SET( charls_HEADERS "colortransform.h" "context.h" "decoderstrategy.h" "encode
6 OPTION(charls_BUILD_SHARED_LIBS "Build CharLS with shared libraries." OFF)
7 SET(BUILD_SHARED_LIBS ${charls_BUILD_SHARED_LIBS})
8
9-add_library(CharLS header.cpp interface.cpp jpegls.cpp )
10+# Add soname to generated shared lib
11
12+SET(CHARLS_LIB_MAJOR_VERSION 1)
13+SET(CHARLS_LIB_MINOR_VERSION 0)
14+
15+IF(BUILD_SHARED_LIBS)
16+ add_library(CharLS SHARED header.cpp interface.cpp jpegls.cpp
17+ stdafx.cpp
18+ )
19+ set_target_properties( CharLS PROPERTIES
20+ VERSION ${CHARLS_LIB_MAJOR_VERSION}.${CHARLS_LIB_MINOR_VERSION}
21+ SOVERSION ${CHARLS_LIB_MAJOR_VERSION}
22+ )
23+
24+ENDIF(BUILD_SHARED_LIBS)
25
26 add_executable(charlstest test/main.cpp test/time.cpp test/util.cpp test/bitstreamdamage.cpp test/compliance.cpp test/performance.cpp test/dicomsamples.cpp)
27 target_link_libraries (charlstest CharLS)
28@@ -29,4 +42,8 @@ target_link_libraries (charlstest CharLS)
29 # Installs the header files into the {build_dir}/include/libcharls directory
30 install(FILES ${charls_HEADERS} DESTINATION include/CharLS)
31
32+# Installs the target file (libCharLS.so) into the {build_dir}/lib directory
33+install(TARGETS CharLS LIBRARY DESTINATION lib${LIB_SUFFIX})
34+
35+
36
This page took 0.065738 seconds and 4 git commands to generate.