build error when compiling ark libzip plugin
Alexander Neundorf
neundorf at kde.org
Tue Feb 3 21:07:00 CET 2009
On Tuesday 03 February 2009, you wrote:
> Alexander Neundorf schrieb:
> > On Saturday 31 January 2009, Orville Bennett wrote:
> >> I had some trouble when enabling zip support in ark. Reason seems to
> >> be "off_t" defined in
> >> both /usr/include/sys/types.h and kdeutils-4.2.0/ark/plugins/
> >> libzipplugin/zipplugin.cpp.
> >>
> >> zipplugin.cpp block
> >> #ifdef LIBZIP_COMPILED_WITH_32BIT_OFF_T
> >> #define __off_t_defined
> >> typedef quint32 off_t;
> >> #endif /* LIBZIP_COMPILED_WITH_32BIT_OFF_T */
> >>
> >> types.h block
> >> #ifndef _OFF_T
> >> typedef __darwin_off_t off_t;
> >> #define _OFF_T
> >> #endif
> >>
> >> This thread convinced me the definition in zipplugin.cpp was
> >> unnecessary
> >> http://lists.apple.com/archives/Scitech/2006/Sep/msg00071.html which
> >> lead to this change in kdeutils-4.2.0/ark/plugins/libzipplugin/
> >> CMakeLists.txt
> >>
> >> @@ -4,11 +4,11 @@
> >> ${CMAKE_CURRENT_BINARY_DIR}/../..
> >> )
> >>
> >> -if(WIN32)
> >> +if(APPLE OR WIN32)
> >> set (LIBZIP_COMPILED_WITH_32BIT_OFF_T OFF CACHE BOOL "Whether
> >> the system libzip library is compiled with 32bits off_t" )
> >> -else(WIN32)
> >> +else(APPLE OR WIN32)
> >> set (LIBZIP_COMPILED_WITH_32BIT_OFF_T ON CACHE BOOL "Whether the
> >> system libzip library is compiled with 32bits off_t" )
> >> -endif(WIN32)
> >> +endif(APPLE OR WIN32)
> >
> > If it's a bool value which goes into the cache I'd recommend using
> > OPTION() instead of SET().
>
> That doesn't make sense though - there probably is no system where both
> is possible.
If it is put in the cache, this usually means that it is intended that the
user might change it. So it could as well just be an OPTION().
If it's always the case on these platforms, set() without the cache would be
better.
But I guess somebody wanted to have it adjustable.
Alex
More information about the Kde-buildsystem
mailing list