Skip to content

Commit ae986ae

Browse files
lidaobing欧林宝
authored andcommitted
fix soversion and install dir in debian (#66)
1 parent 8d10a38 commit ae986ae

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set (Demo_VERSION_MAJOR 0)
1818
set (Demo_VERSION_MINOR 2)
1919
set (Demo_VERSION_DEBUG 0)
2020
set(VERSION ${Demo_VERSION_MAJOR}.${Demo_VERSION_MINOR}.${Demo_VERSION_DEBUG})
21-
set(SOVERSION ${VERSION})
21+
set(SOVERSION ${Demo_VERSION_MAJOR})
2222

2323
if(APPLE)
2424
set(PKGCONFIG_REQUIRES_PRIVATE "libcrypto")
@@ -33,7 +33,7 @@ CONFIGURE_FILE(
3333

3434
INSTALL(
3535
FILES ${CMAKE_CURRENT_BINARY_DIR}/libjdcloud_signer.pc
36-
DESTINATION lib${LIB_SUFFIX}/pkgconfig
36+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
3737
)
3838

3939
if(WIN32)
@@ -67,17 +67,18 @@ set_property(TARGET jdcloudsigner PROPERTY CXX_STANDARD 11)
6767

6868
add_library(jdcloudsigner_shared SHARED $<TARGET_OBJECTS:jdcloudsigner>)
6969
set_target_properties(jdcloudsigner_shared PROPERTIES OUTPUT_NAME jdcloud_signer)
70+
set_target_properties(jdcloudsigner_shared PROPERTIES VERSION ${VERSION})
7071
set_target_properties(jdcloudsigner_shared PROPERTIES SOVERSION ${SOVERSION})
7172

7273
add_library(jdcloudsigner_static STATIC $<TARGET_OBJECTS:jdcloudsigner>)
7374
set_target_properties(jdcloudsigner_static PROPERTIES OUTPUT_NAME jdcloud_signer)
7475

7576
install(TARGETS jdcloudsigner_shared
7677
LIBRARY
77-
DESTINATION lib)
78+
DESTINATION ${CMAKE_INSTALL_LIBDIR})
7879
install(TARGETS jdcloudsigner_static
7980
ARCHIVE
80-
DESTINATION lib)
81+
DESTINATION ${CMAKE_INSTALL_LIBDIR})
8182

8283
add_executable(jdcloud_signer_test
8384
tests/TestMain.cpp

0 commit comments

Comments
 (0)