Got carried away in the midst of testing a few variations of CMakeList (had to 
fix installations on
Apple for LibreOffice - it does not have all of the standard directories of OOo 
anymore - and in
addition Java 9 and higher on Apple for the OpenOffice/LibreOffice ooRexx 
scripts, if using the
GUI), hope to be back at the CMakeList for creating the links tomorrow.

---rony


On 01.01.2019 22:50, Rony G. Flatscher wrote:
>
> Found another way to get it to install by issuing a:
>
>          install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${linkName} 
> COMPONENT Core DESTINATION ${INSTALL_LIB_DIR})
>
> Originally I tried to run "install(CODE...)" that would create the symbolic 
> links. Given that I
> had arrived at many, many variations I might not have done that right and 
> will try tomorrow.
>
> The macro (defined for UNIX and called at the end of the shared library 
> definitions) currently
> looks like:
>
>        # define macro to create symlinks at installation time to allow 
> programs compiled against older versions of Rexx and ooRexx to run
>        macro(rgf_create_symlink target)
>
>         set(baseName   "${CMAKE_SHARED_LIBRARY_PREFIX}${target}")
>         set(targetName "${baseName}${CMAKE_SHARED_LIBRARY_SUFFIX}")
>
>         foreach(loop_var RANGE 2 4)
>           set(linkName 
> "${baseName}.${loop_var}${CMAKE_SHARED_LIBRARY_SUFFIX}")
>
>           add_custom_command(TARGET ${target} POST_BUILD
>               COMMAND ${CMAKE_COMMAND} -E chdir 
> ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} ln -sf ${targetName} ${linkName} DEPENDS 
> ${target}
>               COMMENT "--> --> [ln -sf ${targetName} ${linkName} DEPENDS 
> ${target}]"
>               )
>
>           install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${linkName} 
> COMPONENT Core DESTINATION ${INSTALL_LIB_DIR})
>
>         endforeach(loop_var)
>
>        endmacro(rgf_create_symlink)
>
> Will do a few more experiments and if it works out on Apple too, I will tidy 
> it up, test again and
> supply a patch, hopefully tomorrow.
>
> ---rony
>

_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to