On Wed, Feb 17, 2010 at 11:57 AM, Martin Hollmichel
<martin.hollmic...@sun.com> wrote:

> usually I analyse the build logs for understanding these kind of mechanisms,
> here's my extract for sal module on Linux:
> ...
> tr -d "\015" < sal.map | awk -f ...../solenv/bin/addsym.awk >
> ../unxlngi6.pro/misc/sal_uno_sal.map
> ....
> Making: ../unxlngi6.pro/lib/libuno_sal.so.3
> g++ -Wl,-z,noexecstack -Wl,-z,combreloc -Wl,-z,defs -Wl,-Bsymbolic-functions
> -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo
> -Wl,--hash-style=both -Wl,-rpath,'$ORIGIN' "-Wl,-hlibuno_sal.so.3" -shared
> -Wl,-O1 -Wl,--version-script ../unxlngi6.pro/misc/sal_uno_sal.map .......

There seem to be two phases in this. First you generate the target
file with awk and then pass it to the linker. The first one is
straightforward.

The latter is a bit trickier but not very hard. First you set a
dependency between the shared library and the generated version file.
Then you need to pass the file to the linker. CMake allows you to
define custom linker flags per target. To get the above you would add
something like this:

set_target_properties(sal PROPERTIES LINK_FLAGS "-Wl,--version-script
${GENERATED_SAL_MAP_FILE}")

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tools.openoffice.org
For additional commands, e-mail: dev-h...@tools.openoffice.org

Reply via email to