Re: CMake update
Michel Lesoinne <[email protected]> Wed, 12 Mar 2008 04:05:26 -0600
| Newsgroups | gmane.comp.video.cinepaint.devel |
|---|---|
| Message-ID | <[email protected]> |
I have updated cvs with the full CMake configuration for both glasgow
and cinepaint.
I had already mailed the list, but it seems some emails got lost and I
do not even find them in my "sent" folder. So I am going to try to
summarize things here.
1) To use cmake to build
First you need to configure everything once. To do so, use:
cmake .
You can also use
ccmake .
ccmake allows you to change variables. For example you can change
where the installation directory is. If you use ccmake, it will bring up
a text based interface. use 'c' to configure once, then it will show you
the variables you can change. You can go change the installation
directory there. Then hit 'c' one more time to re-do the configuration.
Finally use 'g' to generate the make files and exit.
Secondly, you can use make to build the various parts and make
install to install and there is also a make clean.
2) In response to Robin's questions about the missing files in the list,
there are things such as the gradients, curves, palettes, patterns and
script.
3) For the missing plugins in glasgow, the place to look at are :
- glasgow/plug-ins/CMakeLists.txt
A typical entry is:
ADD_LIBRARY(jpeg SHARED jpeg/jpeg.cpp)
SET_TARGET_PROPERTIES(jpeg PROPERTIES PREFIX "")
if a particular library is required for a plugin, then you
need to add it like this:
TARGET_LINK_LIBRARIES(blur ${HALF_LIBRARY})
4) For the missing plugins in cinepaint, look at:
- cinepaint/plug-ins/CMakeLists.txt
For the simplest plugins, it goes like:
ADD_EXECUTABLE(dicom dicom/dicom.c)
TARGET_LINK_LIBRARIES(dicom lib wire ${GTK_LIBRARIES})
If a particular plugin needs to link with some libraries
containing C++, then do like in the following example:
ADD_EXECUTABLE(edge edge/edge.c)
TARGET_LINK_LIBRARIES(edge lib wire libhalf ${GTK_LIBRARIES})
SET_TARGET_PROPERTIES(edge PROPERTIES LINKER_LANGUAGE CXX)
Finally add the new plugin to the install list at the end of
the same file.
- If you have a more complex plugin that require to change the
includes, unless you are not concerned about compiling all plugins with
the added includes, then use the example of openexr:
In cinepaint/plug-ins/CMakeLists.txt add something like:
ADD_SUBDIRECTORY(openexr)
Then create openexr/CMakeLists.txt from the plug-ins
subdirectory. There add the correct includes, links and install. openexr
will show you also how a plugin can be built conditionally assuming some
supporting library can be found.
I hope you guys can test this and report any problems to me.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/