[PATCH] Fix kirigami build

Dirk Hohndel dirk at hohndel.org
Thu Aug 18 21:27:55 PDT 2016


On Thu, Aug 18, 2016 at 12:42:32PM +0200, Anton Lundin wrote:
> > > +++ b/CMakeLists.txt
> > > @@ -240,7 +240,8 @@ if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable")
> > >  	endif()
> > >  	ADD_LIBRARY(kirigami_static_library STATIC IMPORTED)
> > >  	SET_TARGET_PROPERTIES(kirigami_static_library PROPERTIES
> > > -		IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/../kirigami-build/src/libkirigamiplugin.a)
> > > +		IMPORTED_LOCATION ${KIRIGAMI_LIBRARY})
> > 
> > No, that breaks the build as KIRIGAMI LIBRARY is not defined in the
> > CMakeLists.txt file. It's fine to have this work if the value is provided
> > buy a build script, but there must be a default value so existing builds
> > don't break with syntax error.
> > 
> 
> This cmake part can be done better, as said above. I don't know how to
> create a mandatory parameter which is conditional on it being the
> MobileExecutable thats being built, so thats why i did it this way.
> 
> I agree that its bad to break peoples build dirs, but how is building a
> mobile version by just rebuilding subsurface at the moment?
> When built via the scripts, both scripts/build.sh and
> packaging/android/build.sh, they will add the relevant parameter, so
> that why i really don't see this as a big blocker.

Yes, it's all a mess right now. Mea culpa.

> The ios build script doesn't build kirigami at all as far as it looks to me.

Correct, because the qmake build simply links kirigami into the
executable, and I think I'll just do the same for the cmake builds.

> Anyhow, this will _never_ work with the android builds (and probably ios
> to) due to that kirigami library not being next to the subsurface dir.
> 
> Even worse, if one would do as i do and build multiple different arches
> at on the same machine, the library might exist but being built for the
> wrong arch.
> 
> So, cmake'ers: how do one create a conditional mandatory parameter?

No, let's not do that. Let me see if I can fix things differently.

/D


More information about the subsurface mailing list