[sbteclipse] Native libraries in classpath

173 views
Skip to first unread message

Jesse C

unread,
May 1, 2012, 4:39:00 PM5/1/12
to simple-b...@googlegroups.com
So a couple of the libraries in our unmanaged lib directory have native libraries that need to be linked to them.  Easy enough to do in the eclipse project, but we're regenerating our eclipse projects fairly frequently as we add/remove dependencies or make changes to our build setup.  So it would be great to have the ability to associate a native library path with a library in the sbteclipse configuration so we don't have to manually add that each time we regenerate the project.  In the eclipse .classpath file it looks like:

        <classpathentry kind="lib" path="../project/lib/zmq.jar">
                <attributes>
                        <attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="project/src/libOther/native/linux/x64"/>
                </attributes>
        </classpathentry>

Heiko Seeberger

unread,
May 1, 2012, 10:14:55 PM5/1/12
to simple-b...@googlegroups.com
In sbteclipse 2.1.0 (there are already milestones available) you can post process the .project and .classpath files:

projectTransformerFactories
+++++++++++++++++++++++++++

This setting of type *SettingKey[Seq[EclipseTransformerFactory[RewriteRule]]]* creates factories for a rewrite rule for the *.project* file.

It should hopefully be straightforward to transform a classpathentry element with a specific content (path attribute) in such a way that it gets an attribute element added.

Heiko

--

Heiko Seeberger
Twitter: hseeberger
Blog: heikoseeberger.name
Company: Typesafe - The software stack for applications that scale
Author of Durchstarten mit Scala, a German tutorial-style Scala book


--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

Jesse C

unread,
May 2, 2012, 1:10:26 PM5/2/12
to simple-b...@googlegroups.com
I'll check that out.  thanks
Reply all
Reply to author
Forward
0 new messages