OF packaging, compilation, shared library

Hi,

I’m new to OF and i would like to develop using OF.
I’m not used to use and IDE. I usually use simple Makefiles (or autoconf/automake) for my other
projects

I’m very interested in working on a debian/ubuntu package or at least a shared library but the first step is
to have a compilation framework.

I saw a post about CMake and i think it’s a very interesting project i’d like to work on with peoples involved in.

At this time is there any method to build a shared library or making command line compilation easyer ?

Regards,
F.

in 006 there’s makefiles for all the examples, actually they are created with this tool by pix:

http://pix.test.at/wiki/cbp2makefile

you can base on that to make your own makefiles, although they are autogenerated the structure is pretty understandable

hi dopuskh3. i changed arturos makefiles to build ‘shared’-libs for openframeworks and addons, will push it to github.com/lian/ofx-dev next hours… take a look at the Makefile.linux_shared and in ofx-dev/libs/libofw

its pretty awesome, i.e. once libofw.so and libofw_coreaddons.so + libofw_msaaddons.so is compiled - you only link to it. 3DModelLoader example takes only 16kb in release, and allows me to package all example-apps precompiled in a 13mb zip (on linux).

lian

Hi,

Really nice. I will have a look. Anyway i will write a CMake skelton. I checked out the svn
trunk from http://svn.openframeworks.cc/openFrameworks/trunk/ and the last was made
2 month ago. Does the repository changed or is it normal. I have to check-out the current
development version to develop an up-to-date CMake skelton.

Regards,
F.

[quote author=“lian”]hi dopuskh3. i changed arturos makefiles to build ‘shared’-libs for openframeworks and addons, will push it to github.com/lian/ofx-dev next hours… take a look at the Makefile.linux_shared and in ofx-dev/libs/libofw

its pretty awesome, i.e. once libofw.so and libofw_coreaddons.so + libofw_msaaddons.so is compiled - you only link to it. 3DModelLoader example takes only 16kb in release, and allows me to package all example-apps precompiled in a 13mb zip (on linux).

lian[/quote]

it’s normal – we aren’t always updating the svn after a new release. addons was touched about 2 weeks ago.

we will be back at the svn shortly, and likely doing some reconfiguration about the layout to make a universal package for all platforms / compilers.

take care,
zach

Hi,

How can i contribute this work ? I’would like to make something usefull for others. What do
you plan to use to make a universal package ? CMake ?

F.

[quote author=“zach”]it’s normal – we aren’t always updating the svn after a new release. addons was touched about 2 weeks ago.

we will be back at the svn shortly, and likely doing some reconfiguration about the layout to make a universal package for all platforms / compilers.

take care,
zach[/quote]

no, what I mean is having one folder setup that matches every possible platform, and then deleting via a script to leave the “mac xcode” or “windows codeblocks” platform.

We’ve looked at auto makefile / project file generators, but they don’t seem to do all of what we need… (I was getting into premake before). maybe cmake is better? for us, we need the make file generator to support all the current platforms *and* allow for very specific includes / links as well as virtual folders, compile options, scripts (for dynamic stuff, like putting dlls in the right place). It’s not super straightforward, unfortunately…

I think in the next days we’ll hit up a wishlist on scripts and such. I think while the linux platform is pretty well scripted out (for installing, for example, the dev environment or adding an addon) the other platforms could use some love.

take care!
zach

Ok. I’ll check CMake during the following days. I think it’s not as complicated. The only tricky thing is
to have all dependencies installed. Some don’t have packages.
I don’t know cmake well but i think it can do most of the task you’re talking about (kde use CMake for example and it’s not a small project).
I will try to make CMake template for addons too.

[quote author=“zach”]no, what I mean is having one folder setup that matches every possible platform, and then deleting via a script to leave the “mac xcode” or “windows codeblocks” platform.

We’ve looked at auto makefile / project file generators, but they don’t seem to do all of what we need… (I was getting into premake before). maybe cmake is better? for us, we need the make file generator to support all the current platforms *and* allow for very specific includes / links as well as virtual folders, compile options, scripts (for dynamic stuff, like putting dlls in the right place). It’s not super straightforward, unfortunately…

I think in the next days we’ll hit up a wishlist on scripts and such. I think while the linux platform is pretty well scripted out (for installing, for example, the dev environment or adding an addon) the other platforms could use some love.

take care!
zach[/quote]

Hi,

Is there any plan to integrate this work ? http://forum.openframeworks.cc/t/cmake-as-crossplatform-solution-testers/1058/7 before). maybe cmake is better? for us, we need the make file generator to support all the current platforms *and* allow for very specific includes / links as well as virtual folders, compile options, scripts (for dynamic stuff, like putting dlls in the right place). It’s not super straightforward, unfortunately…

I think in the next days we’ll hit up a wishlist on scripts and such. I think while the linux platform is pretty well scripted out (for installing, for example, the dev environment or adding an addon) the other platforms could use some love.

take care!
zach[/quote]

not sure as I haven’t had a chance to test this… can you see how it works for you? I am interested in how closely a system like this builds project files like the ones we have.

if it can help build a release of OF for a given compiler, quickly, cool, but I’m personally not excited about shipping with cmake files everywhere. it looks a bit messy to me. I guess I need some more experience with it.

_edit – that’s not to say that we don’t support development of cmake / make solutions, it’s just that first and foremost we are supporting IDEs, and would love to see if cmake can make that easier.
_

take care!
zach

here is what i did to build openframeworks as shared lib and have its example link to it, with relativly low effort

http://github.com/lian/ofx-dev/commit/4-…-11a927eff0
http://github.com/lian/ofx-dev/commits

== usage example

= compile libofw_*.so (this step only once)
cd libs/libofw
make -f Makefile.shared_core Release
make -f Makefile.shared_coreaddons Release
make -f Makefile.shared_msaaddons Release

= compile examples
cd apps/addonsExamples/3DModelLoaderExample
make -f Makefile.linux_shared Release # (Debug|Release|copy_libs)
cd bin; ./3DModelLoaderExample.sh

= to move finished app, remember to run ‘copy_libs’ which moves
= depended libs to your ./bin directory
make -f Makefile.linux_shared copy_libs
ls bin/lib/*

let me know if it works out for you!

Hi,

I managed to compile of as a shared library using CMake. (2 little CMake files)

I started from http://forum.openframeworks.cc/t/cmake-as-crossplatform-solution-testers/1058/7

== usage example

= compile libofw_*.so (this step only once)
cd libs/libofw
make -f Makefile.shared_core Release
make -f Makefile.shared_coreaddons Release
make -f Makefile.shared_msaaddons Release

= compile examples
cd apps/addonsExamples/3DModelLoaderExample
make -f Makefile.linux_shared Release # (Debug|Release|copy_libs)
cd bin; ./3DModelLoaderExample.sh

= to move finished app, remember to run ‘copy_libs’ which moves
= depended libs to your ./bin directory
make -f Makefile.linux_shared copy_libs
ls bin/lib/*

let me know if it works out for you![/quote]

hi

there’s 2 more svns apart from the core one:

http:/svn.openframeworks.cc/examples

with all examples and

http://svn.openframeworks.cc/addons/ofxXXXX

with all addons and it’s examples inside each addon.

Hi,

I managed to have a primary version of the cmake files compiling.

The main checkings and variables settings are included in a ofxBuild.txt cmake file
witch can be used to compile openframeworks libraries or example.

I managed to use it on linux but i cannot test on other platforms. (It correctly
generates codeblocks project)

Available here : http://www.digitalork.com/svn/ofx/trunk/build-files/

Or with SVN: svn checkout http://www.digitalork.com/svn/ofx/trunk/build-files/

This is a test at this time but if some find this approach interesting i think it would
be pretty easy to compile addons too.

Let me know.

Regards,
Francois

[quote author=“arturo”]hi

there’s 2 more svns apart from the core one:

http:/svn.openframeworks.cc/examples

with all examples and

http://svn.openframeworks.cc/addons/ofxXXXX

with all addons and it’s examples inside each addon.[/quote]

I’m curious if there’s been much movement on this front? I spent a little while looking at cmake and it seems really attractive - especially the ability to generate project files for xcode, code blocks, visual studio and friends.