zpelgrims / zoic

Extended camera shader for the ever-awesome Arnold Renderer
http://www.zenopelgrims.com/zoic
67 stars 25 forks source link

SCons build scripts #6

Closed gatgui closed 8 years ago

gatgui commented 8 years ago

Adding SCons build script to replace qmake based system.

To build on any platform (given that you have python and SCons installed on the system) you can build typing "scons with-arnold=/path/to/arnold" in a terminal.

The build output ("release" folder after the build) is arranged to match the layout of your release tarballs so far.

Also, the NO_OIIO flag is set automatically if the used arnold version allows it (>=4.2.9.0). Otherwise, OpenImageIO is still required and its header/library directories can be specified using either "with-oiio=/path/to/oiio" ("include" and "lib" are appended to created header and library paths respectively) or the more explicit "with-oiio-inc=/path/to/oiio/include" and "with-oiio-lib=/path/to/oiio/lib"

Notes:

PS: I know all the hype is with CMake, but I just don't like it. I prefer writing my build scripts in python :)

zpelgrims commented 8 years ago

Wow, you lost me here haha. I am very new to c++ programming and the whole compiling side of it. What's the advantage of doing it like this?

gatgui commented 8 years ago

Well, simply put, your build script may work, but probably only for you and your linux machine as far as i can see.

The script i provide doesn't hardcode any path, works on any platform, properly separate temporary object files from source files and output files. It also take care of most of the compiler flags you may want to set, it will automatically track the source dependencies only recompiling what is necessary (though i agree, with a single source file that won't make much difference)...

Other systems like CMake provides the same kind of functionalities. After, it is a matter of taste.

MtoA and HtoA use SCons too btw

zpelgrims commented 8 years ago

Okay cool, as long as I can still compile the old fashioned way I know then it's all great :P

gatgui commented 8 years ago

Give it a go and see the result for yourself :) May look like a big wtf at the beginning but once you're used to such systems, returning to make feels like being a caveman