[Fwd: palapeli: make puzzles as part of build]
Bill Hoffman
bill.hoffman at kitware.com
Mon Oct 26 02:36:06 CET 2009
Stefan Majewsky wrote:
> I'm taking this to kde-buildsystem@ because it's an obscure CMake problem.
>
> The problem is that we want to build Palapeli's default puzzle files
> automatically before installing them. Currently, one has to "make install"
> Palapeli, then run the make-puzzles.sh script in the puzzles/ subdirectory,
> and "make install" again.
>
> Am Freitag 23 Oktober 2009 23:14:27 schrieb Matthew Woehlke:
>> Ping? Stefan, can you please take a look at this and give me a go/no-go?
>> I'd like to be able to fiddle around with palapeli, and, as this is a
>> build system change, it would make branch management easier if I'm not
>> sitting on this locally.
>
> Your patch suffers the problem that you need libpala and the necessary slicer
> plugins installed on the system for libpala-puzzlebuilder to work.
>
> In the attached patch (apply against trunk/playground/games/palapeli), I've
> tried to solve this problem by bypassing KService and using the libpala and
> the slicer plugins from the ${palapeli_BINARY_DIR}. Unfortunately, these are
> only created in "make install", while CMake currently tries to generate them
> in the "make" call.
>
> Here's my question to the CMake experts: How can I rewrite the
> add_custom_command stuff in puzzles/CMakeLists.txt of attached patch in such a
> way that the puzzles are created after the .so files for the needed libraries
> have been created?
>
I think if you create a custom target (add_custom_target) that contains
all of the custom commands to create the puzzle files. Then make the
custom target depend on the .so targets with add_dependencies then it
should do what you want.
-Bill
More information about the Kde-buildsystem
mailing list