Unconventional .so file name which includes version number
Installing stable v0.1.6 release of the lib, found an interesting quirk: .so file gets installed as "libRaptorQ-0.1.6.so", instead of more conventional "libRaptorQ.so.0.1.6" + "libRaptorQ.so" symlink. Seeing how it's a bit hard to do that accidentally, suspect that it might be intentional, but still wanted to ask if maybe this should be fixed?
Only trouble I have with such naming is that in e.g. python-libraptorq I'd have to either hardcode library version(s), match these from filesystem (e.g. via "glob") or make an option for these, all of which seem to be rather inconvenient, though maybe sensible from some very strict and non-opportunistic perspective.
I'm not very familiar with libtool conventions, so please correct me I'm thinking all wrong about this.
Cheers!
P.S. Simple fix I've used to get the usual .so.*
files is:
--- a/CMakeLists.txt 2016-06-02 17:03:50.000000000 +0500
+++ b/CMakeLists.txt 2016-07-15 22:16:26.581053013 +0500
@@ -256,7 +256,7 @@
if(STATIC_LIB MATCHES "ON")
add_library(RaptorQ_Static STATIC ${SOURCES} ${HEADERS})
if(NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
- set_target_properties(RaptorQ_Static PROPERTIES OUTPUT_NAME RaptorQ-${RQ_VERSION})
+ set_target_properties(RaptorQ_Static PROPERTIES OUTPUT_NAME RaptorQ)
endif()
target_compile_options(
RaptorQ_Static PRIVATE
@@ -285,7 +285,7 @@
target_link_libraries(make_deterministic ${STDLIB} ${RQ_UBSAN})
add_custom_command(
OUTPUT deterministic.run
- COMMAND make_deterministic ${CMAKE_BINARY_DIR}/lib/libRaptorQ-${RQ_VERSION}.a
+ COMMAND make_deterministic ${CMAKE_BINARY_DIR}/lib/libRaptorQ.a
DEPENDS RaptorQ_Static
COMMENT "Removing creation date from library..."
VERBATIM
@@ -308,7 +308,7 @@
${CXX_COMPILER_FLAGS}
)
if(NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
- set_target_properties(RaptorQ PROPERTIES OUTPUT_NAME RaptorQ-${RQ_VERSION})
+ set_target_properties(RaptorQ PROPERTIES OUTPUT_NAME RaptorQ)
endif()
if(LTO MATCHES "ON")
@@ -323,6 +323,7 @@
PROPERTIES
LINK_FLAGS "-Wl,-z,now,-z,relro ${LD_OPT}"
)
+ set_target_properties(RaptorQ PROPERTIES SOVERSION ${RQ_VERSION})
set_property(TARGET RaptorQ PROPERTY LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
endif()