[Fwd: palapeli: make puzzles as part of build]

Matthew Woehlke mw_triad at users.sourceforge.net
Mon Oct 26 17:03:13 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.

It does? Oh, I see, because of the kbuildsycoca issue regarding the 
plugins...

I think Bill has the right idea here, add a dependency of the custom 
command on the slicer. That is, add '${SLICER}' to the DEPENDS, as 
follows (only the last line changes, rest is for context):

add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.puzzle
                    COMMAND 
${palapeli_BINARY_DIR}/tools/libpala-puzzlebuilder
                            --slicer ${SLICER}
                            ${CMAKE_CURRENT_SOURCE_DIR}/${NAME}.conf
                            ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.puzzle
                    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
                    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${NAME}.conf
                            libpala-puzzlebuilder ${SLICER})

...plus the 'don't rely on KService' stuff, of course. I'm not familiar 
with the plugin loading, so I will trust you that that is working.

(Actually, I think this has the advantage that if you change the slicer 
plugin, it will newly cause the relevant puzzles to be rebuilt.)

-- 
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
-- 
Joe: This is a big deal, because now some tiny minority has lobbied for 
changes that end up hurting everyone else.
Bob: Yeah, I know. Par for the course. I hate the American government.
Joe: Actually, I was talking about X.org...


More information about the Kde-buildsystem mailing list