On 25.07.2020 20:10, Rony G. Flatscher wrote: > On 25.07.2020 18:57, Rony G. Flatscher wrote: >> >> The library names of the Unix (Linux and Mac) versions of ooRexx added links >> to support earlier >> ooRexx versions in the form >> >> * Linux >> o "lib" name ".so.${ORX_MAJOR}", e.g. >> + librexx.so -> librexx.so.3 >> librexx.so -> librexx.so.4 >> .... >> + librexxapi.so -> librexxapi.so.3 >> librexxapi.so -> librexxapi.so.4 >> ... >> >> * MacOS >> o "lib" name ".${ORX_MAJOR}.dylib", e.g. >> + librexx.dylib -> librexx.3.dylib >> librexx.dylib -> librexx.4.dylib >> ... >> + librexxapi.dylib -> librexxapi.3.dylib >> librexxapi.dylib -> librexxapi.4.dylib >> ... >> >> The version number in the current ooRexx 5.0 beta on Unix (Linux, MacOS) use >> in addition to >> ${ORX_MAJOR} the subnumbers ${ORX_MINOR}.${ORX_MOD_LVL, thereby >> unnecessarily breaking the naming >> system, e.g.: >> >> * Linux >> o "lib" name ".so.${ORX_MAJOR}", e.g. >> + librexx.so -> librexx.so.3 >> librexx.so -> librexx.so.4 >> librexx.so -> librexx.so.5.0.0 >> .... >> + librexxapi.so -> librexxapi.so.3 >> librexxapi.so -> librexxapi.so.4 >> librexxapi.so -> librexxapi.so.5.0.0 >> ... >> >> * MacOS >> o "lib" name ".${ORX_MAJOR}.dylib", e.g. >> + librexx.dylib -> librexx.3.dylib >> librexx.dylib -> librexx.4.dylib >> librexx.dylib -> librexx.5.0.0.dylib >> ... >> + librexxapi.dylib -> librexxapi.3.dylib >> librexxapi.dylib -> librexxapi.4.dylib >> librexxapi.dylib -> librexxapi.5.0.0.dylib >> ... >> >> Suggesting to changing the versioned library names of ooRexx 5 to match the >> established >> convention (using only ${ORX_MAJOR}). >> >> Are there any objections to such a change? >> >> --- >> >> If not, where does "CMAKE_SHARED_LIBRARY_PREFIX" get set (which gets used >> for setting >> "ORX_SHARED_LIBRARY_EXT")? >> > It seems that the above two variables play no role in the version string for > the link file names. > Rather the usage of "set_target_properties(libname PROPERTIES VERSION > ${ORX_VERSION})" for each > "libname" defines the version string to use [1]. So probably using > "${ORX_MAJOR}" instead of > "${ORX_VERSION}" would make the version string in the link names to consist > of "5" only. > > ---rony > > [1] Search for "VERSION" in: > <https://cmake.org/cmake/help/v3.0/command/set_target_properties.html> to > yield: > > "... For shared libraries VERSION and SOVERSION can be used to specify > the build version and > API version respectively. When building or installing appropriate > symlinks are created if the > platform supports symlinks and the linker supports so-names. If only one > of both is specified > the missing is assumed to have the same version number. For executables > VERSION can be used to > specify the build version. When building or installing appropriate > symlinks are created if the > platform supports symlinks. For shared libraries and executables on > Windows the VERSION > attribute is parsed to extract a “major.minor” version number. These > numbers are used as the > image version of the binary. ...". > What the enclosed patch does to "CMakeLists.txt" (tested on Ubuntu):
* changes the variable name in "set_target_properties" for library version from "VERSION" to "SOVERSION", which will self-document the purpose of that property (cf. [1] above), * changes the value from "${ORX_VERSION}" (i.e. "5.0.0") to "${ORX_MAJOR}" (i.e. "5") If there are no objections I will check-in that patch. ---rony
Index: CMakeLists.txt =================================================================== --- CMakeLists.txt (revision 12100) +++ CMakeLists.txt (working copy) @@ -668,7 +668,7 @@ install(TARGETS rexxapi RUNTIME DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core ARCHIVE DESTINATION ${INSTALL_INCLUDE_DIR} COMPONENT DevLib) -set_target_properties(rexxapi PROPERTIES VERSION ${ORX_VERSION}) +set_target_properties(rexxapi PROPERTIES SOVERSION ${ORX_MAJOR}) create_install_symlink(rexxapi) #################### librexx.so ########################## @@ -953,7 +953,7 @@ install(TARGETS rexx RUNTIME DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core ARCHIVE DESTINATION ${INSTALL_INCLUDE_DIR} COMPONENT DevLib) -set_target_properties(rexx PROPERTIES VERSION ${ORX_VERSION}) +set_target_properties(rexx PROPERTIES SOVERSION ${ORX_MAJOR}) create_install_symlink(rexx) #################### orexx (executable) ########################## @@ -1268,7 +1268,7 @@ target_link_libraries(rxmath rexx rexxapi ${platform_rxmath_libs} ${CMAKE_REQUIRED_LIBRARIES}) install(TARGETS rxmath RUNTIME COMPONENT Core DESTINATION ${INSTALL_LIB_DIR} LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core) -set_target_properties(rxmath PROPERTIES VERSION ${ORX_VERSION}) +set_target_properties(rxmath PROPERTIES SOVERSION ${ORX_MAJOR}) create_install_symlink(rxmath) #################### librxsock.so ################ @@ -1286,7 +1286,7 @@ target_link_libraries(rxsock rexx rexxapi ${platform_rxsock_libs} ${CMAKE_REQUIRED_LIBRARIES}) install(TARGETS rxsock RUNTIME COMPONENT Core DESTINATION ${INSTALL_LIB_DIR} LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core) -set_target_properties(rxsock PROPERTIES VERSION ${ORX_VERSION}) +set_target_properties(rxsock PROPERTIES SOVERSION ${ORX_MAJOR}) create_install_symlink(rxsock) @@ -1312,7 +1312,7 @@ target_link_libraries(rxregexp rexx rexxapi ${platform_rxregexp_libs} ${CMAKE_REQUIRED_LIBRARIES}) install(TARGETS rxregexp RUNTIME COMPONENT Core DESTINATION ${INSTALL_LIB_DIR} LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core) -set_target_properties(rxregexp PROPERTIES VERSION ${ORX_VERSION}) +set_target_properties(rxregexp PROPERTIES SOVERSION ${ORX_MAJOR}) create_install_symlink(rxregexp) #################### libhostemu.so ################ @@ -1337,7 +1337,7 @@ target_link_libraries(hostemu rexx rexxapi ${platform_hostemu_libs} ${CMAKE_REQUIRED_LIBRARIES}) install(TARGETS hostemu RUNTIME COMPONENT Core DESTINATION ${INSTALL_LIB_DIR} LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core) -set_target_properties(hostemu PROPERTIES VERSION ${ORX_VERSION}) +set_target_properties(hostemu PROPERTIES SOVERSION ${ORX_MAJOR}) create_install_symlink(hostemu) #################### librxunixsys.so ################ @@ -1358,7 +1358,7 @@ target_link_libraries(rxunixsys rexx rexxapi ${CMAKE_REQUIRED_LIBRARIES}) endif () -set_target_properties(rxunixsys PROPERTIES VERSION ${ORX_VERSION}) +set_target_properties(rxunixsys PROPERTIES SOVERSION ${ORX_MAJOR}) install(TARGETS rxunixsys RUNTIME DESTINATION ${INSTALL_LIB_DIR} LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core) create_install_symlink(rxunixsys) @@ -1379,7 +1379,7 @@ target_link_libraries(orxncurses rexx rexxapi ncurses ${CMAKE_REQUIRED_LIBRARIES}) # Make sure ncurses.cls gets copied add_custom_target(ncurses_cls ALL DEPENDS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ncurses.cls) - set_target_properties(orxncurses PROPERTIES VERSION ${ORX_VERSION}) + set_target_properties(orxncurses PROPERTIES SOVERSION ${ORX_MAJOR}) install(TARGETS orxncurses RUNTIME DESTINATION ${INSTALL_LIB_DIR} LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core) install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ncurses.cls COMPONENT Core DESTINATION ${INSTALL_CLS_DIR})
_______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel