[bt-devel] CMakeLists.txt Patch

Martin Gruner mg.pub at gmx.net
Thu Sep 11 12:43:49 MST 2008


Hi Greg, 

thank you for your changes. Can you please update CMakeLists.txt again from 
SVN and send me your renewed patch again, so that I can apply it on my current 
source? Sorry for the race-condition. =)

BTW, you changed the directory structure to match MacOS requirements. Did you 
also patch directoryutil.cpp? In its current implementation it requires the 
current directory structure or will fail because it does not find required 
directories. I guess this does not work with your new structure out of the 
box, does it?

mg

Am Donnerstag, 11. September 2008 21:06:35 schrieb Greg Hellings:
> Appended below you will see a diff from the version of CMakeLists.txt
> that was included with the beta1 software and a version that now works
> to build the executable on both Linux and Mac OS X, plus it does not
> require the shell scripts.
>
> Changes include the following:
> * No longer links directly to the Qt* libraries - instead uses the
> CMake variable from the FindQt4 macros.
> * Will automatically set CMAKE_BUILD_TYPE to "Debug" if no version is
> specified on the command line
> * Will automatically install to the ./install/ directory unless
> explicitly overridden by CMAKE_INSTALL_PREFIX on invocation of cmake.
> This differs slightly from the behavior of the shell scripts, which
> default the Debug version to ./install and the Release version to
> /usr/local.
> * Properly installs support files into the application bundle on Mac OS X.
>
> I tried and tried to get the KDE4_ADD_APP_ICON to work properly for
> installing the application icon on OS X, but it just doesn't seem to
> work for me.  I could always install it with manual steps in the
> CMakeLists.txt file, but I'd rather use the supported methods, which
> are supposed to make it a single-step process.  KDE4_ADD_APP_ICON
> should also add the icon to a Windows binary, but I haven't bothered
> tackling that issue at all.
>
> For other Mac users, I had to install MacPorts and build kdelibs4,
> kdeartwork4 and kdebase4 as well as install sword and its dependencies
> (it doesn't pick up the location of CLucene in /opt/local from
> MacPorts unless you specify --with-clucene=/opt/local) before building
> Bibletime.  But, if you do that, then Bibletime builds beautifully
> into an application bundle which can be launched like a normal, native
> application.
>
> --Greg
>
> Diff:
> 17a18,19
>
> > SET(QT_USE_DBUS 1)
> > SET(QT_USE_QTXML 1)
>
> 80a83
>
> > 	INCLUDE(${QT_USE_FILE})
>
> 85,88c88
> < 		QtCore
> < 		QtGui
> < 		QtXml
> < 		QtDBus
> ---
>
> > 		${QT_LIBRARIES}
>
> 92a93
>
> > 	SET(CMAKE_BUILD_TYPE "Debug")
>
> 97a99,100
>
> > 	SET(QT_USE_QTTEST 1)
> > 	INCLUDE(${QT_USE_FILE})
>
> 102,106c105,106
> < 		QtCore
> < 		QtGui
> < 		QtXml
> < 		QtDBus
> < 		QtTest
> ---
>
> > 		${QT_LIBRARIES}
> > 		${QT_LIBRARIES_DEBUG}
>
> 121c121
> < IF (NOT CMAKE_INSTALL_PREFIX)
> ---
>
> > IF (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
>
> 123c123,129
> < ENDIF (NOT CMAKE_INSTALL_PREFIX)
> ---
>
> > ENDIF (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
> >
> > ADD_CUSTOM_TARGET(install-dir
> > 	COMMAND echo ${CMAKE_INSTALL_PREFIX}
> > 	WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
> > 	COMMENT "Testing some things"
> > )
>
> 126c132,136
> < SET(CMAKE_CXX_FLAGS_DEBUG "-Wall -Werror -pedantic-errors -O0 -g")
> ---
>
> > IF (NOT APPLE)
> > 	SET(CMAKE_CXX_FLAGS_DEBUG "-Wall -Werror -pedantic-errors -O0 -g")
> > ELSE (NOT APPLE)
> > 	SET(CMAKE_CXX_FLAGS_DEBUG "-Wall -O0 -g")
> > ENDIF (NOT APPLE)
>
> 143c153,160
> < # main binary
> ---
>
> > # main binary - Mac specifics handled by the KDE4_ADD_EXECUTABLE
> > IF (APPLE)
> > 	SET (BT_DESTINATION ".")
> > 	SET (BT_SHARE_PATH bibletime.app/Contents/)
> > ELSE (APPLE)
> > 	SET (BT_DESTINATION "bin/")
> > 	SET (BT_SHARE_PATH "")
> > ENDIF (APPLE)
>
> 145,146c162,163
> < 	DESTINATION "bin/"
> < 	CONFIGURATIONS Debug Release Debug_Binonly
> ---
>
> > 	DESTINATION "${BT_DESTINATION}"
> > 	CONFIGURATIONS Debug Release Debug_Binonly Debugfull
>
> 151,152c168,169
> < 		DESTINATION "share/bibletime/locale/"
> < 		CONFIGURATIONS Debug Release
> ---
>
> > 		DESTINATION "${BT_SHARE_PATH}share/bibletime/locale/"
> > 		CONFIGURATIONS Debug Release Debugfull
>
> 158,159c175,176
> < 	DESTINATION "share/bibletime/icons/"
> < 	CONFIGURATIONS Debug Release
> ---
>
> > 	DESTINATION "${BT_SHARE_PATH}share/bibletime/icons/"
> > 	CONFIGURATIONS Debug Release Debugfull
>
> 164,165c181,182
> < 	DESTINATION "share/bibletime/display-templates/"
> < 	CONFIGURATIONS Debug Release
> ---
>
> > 	DESTINATION "${BT_SHARE_PATH}share/bibletime/display-templates/"
> > 	CONFIGURATIONS Debug Release Debugfull
>
> 169,170c186,187
> < 	DESTINATION "share/bibletime/pics/"
> < 	CONFIGURATIONS Debug Release
> ---
>
> > 	DESTINATION "${BT_SHARE_PATH}share/bibletime/pics/"
> > 	CONFIGURATIONS Debug Release Debugfull
>
> 177,178c194,195
> < 		DESTINATION "share/bibletime/docs/handbook/${HANDBOOK_LOCALE_LANG}/"
> < 		CONFIGURATIONS Debug Release
> ---
>
> > 		DESTINATION
> > "${BT_SHARE_PATH}share/bibletime/docs/handbook/${HANDBOOK_LOCALE_LANG}/"
> > CONFIGURATIONS Debug Release Debugfull
>
> 181,182c198,199
> < 		DESTINATION "share/bibletime/docs/handbook/${HANDBOOK_LOCALE_LANG}/"
> < 		CONFIGURATIONS Debug Release
> ---
>
> > 		DESTINATION
> > "${BT_SHARE_PATH}share/bibletime/docs/handbook/${HANDBOOK_LOCALE_LANG}/"
> > CONFIGURATIONS Debug Release Debugfull
>
> 189,190c206,207
> < 		DESTINATION "share/bibletime/docs/howto/${HOWTO_LOCALE_LANG}/"
> < 		CONFIGURATIONS Debug Release
> ---
>
> > 		DESTINATION
> > "${BT_SHARE_PATH}share/bibletime/docs/howto/${HOWTO_LOCALE_LANG}/"
> > CONFIGURATIONS Debug Release Debugfull
>
> 198,199c215,216
> < 	DESTINATION "share/icons/"
> < 	CONFIGURATIONS Debug Release
> ---
>
> > 	DESTINATION "${BT_SHARE_PATH}share/icons/"
> > 	CONFIGURATIONS Debug Release Debugfull
>
> 204,205c221,222
> < 	DESTINATION "share/applications/"
> < 	CONFIGURATIONS Debug Release
> ---
>
> > 	DESTINATION "${BT_SHARE_PATH}share/applications/"
> > 	CONFIGURATIONS Debug Release Debugfull
>
> _______________________________________________
> bt-devel mailing list
> bt-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/bt-devel




More information about the bt-devel mailing list