From 0e865e2b7e566235912012e357111792f4e31d8c Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 3 Feb 2010 01:37:00 +0000 Subject: Added abandoned KDE3 version of the GTK Qt theme engine git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/gtk-qt-engine@1084394 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- CMake/Modules/COPYING-CMAKE-SCRIPTS | 27 ++++++++++++ CMake/Modules/FindMsgfmt.cmake | 86 +++++++++++++++++++++++++++++++++++++ CMake/Modules/GtkQt.cmake | 56 ++++++++++++++++++++++++ 3 files changed, 169 insertions(+) create mode 100644 CMake/Modules/COPYING-CMAKE-SCRIPTS create mode 100644 CMake/Modules/FindMsgfmt.cmake create mode 100644 CMake/Modules/GtkQt.cmake (limited to 'CMake') diff --git a/CMake/Modules/COPYING-CMAKE-SCRIPTS b/CMake/Modules/COPYING-CMAKE-SCRIPTS new file mode 100644 index 0000000..9cb049d --- /dev/null +++ b/CMake/Modules/COPYING-CMAKE-SCRIPTS @@ -0,0 +1,27 @@ +This licence file applies only to FindMsgfmt.cmake and was taken from: +http://code.google.com/p/cmake-modules/ + +----------------------------------------------------------------------- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/CMake/Modules/FindMsgfmt.cmake b/CMake/Modules/FindMsgfmt.cmake new file mode 100644 index 0000000..60e33ee --- /dev/null +++ b/CMake/Modules/FindMsgfmt.cmake @@ -0,0 +1,86 @@ +# +# - Try to find the msgfmt executeable +# +# It will set the following variables: +# +# MSGFMT_FOUND +# MSGFMT_EXECUTABLE +# +################################################################### +# +# Copyright (c) 2006, Andreas Schneider +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +################################################################### +# +# Copyright (c) 2006 Andreas Schneider +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# +# * Neither the name of the cmake-modules nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +IF (MSGFMT_EXECUTABLE) + # in cache alread? + SET(MSGFMT_FOUND TRUE) +ELSE (MSGFMT_EXECUTABLE) + IF (UNIX) + FIND_PROGRAM(MSGFMT_EXECUTABLE + NAMES + msgfmt + PATHS + /usr/bin + /usr/local/bin + ) + + IF(MSGFMT_EXECUTABLE) + SET(MSGFMT_FOUND TRUE) + ELSE(MSGFMT_EXECUTABLE) + MESSAGE(FATAL_ERROR "msgfmt not found - po files can't be processed") + ENDIF(MSGFMT_EXECUTABLE) + + MARK_AS_ADVANCED(MSGFMT_EXECUTABLE) + ENDIF(UNIX) +ENDIF (MSGFMT_EXECUTABLE) + +# vim:et ts=2 sw=2 comments=\:\# diff --git a/CMake/Modules/GtkQt.cmake b/CMake/Modules/GtkQt.cmake new file mode 100644 index 0000000..1251d95 --- /dev/null +++ b/CMake/Modules/GtkQt.cmake @@ -0,0 +1,56 @@ +# Both these macros are taken from KDE3Macros.cmake +# Apart from the names, the only modification is that they take a destination argument + +MACRO(GTKQT_KDE3_ADD_KPART _target_NAME _destination _with_PREFIX) +#is the first argument is "WITH_PREFIX" then keep the standard "lib" prefix, otherwise SET the prefix empty + IF (${_with_PREFIX} STREQUAL "WITH_PREFIX") + SET(_first_SRC) + ELSE (${_with_PREFIX} STREQUAL "WITH_PREFIX") + SET(_first_SRC ${_with_PREFIX}) + ENDIF (${_with_PREFIX} STREQUAL "WITH_PREFIX") + + IF (KDE3_ENABLE_FINAL) + KDE3_CREATE_FINAL_FILE(${_target_NAME}_final.cpp ${_first_SRC} ${ARGN}) + ADD_LIBRARY(${_target_NAME} MODULE ${_target_NAME}_final.cpp) + ELSE (KDE3_ENABLE_FINAL) + ADD_LIBRARY(${_target_NAME} MODULE ${_first_SRC} ${ARGN}) + ENDIF (KDE3_ENABLE_FINAL) + + IF(_first_SRC) + SET_TARGET_PROPERTIES(${_target_NAME} PROPERTIES PREFIX "") + ENDIF(_first_SRC) + + GTKQT_KDE3_INSTALL_LIBTOOL_FILE(${_target_NAME} ${_destination}) + +ENDMACRO(GTKQT_KDE3_ADD_KPART) + +MACRO(GTKQT_KDE3_INSTALL_LIBTOOL_FILE _target _destination) + GET_TARGET_PROPERTY(_target_location ${_target} LOCATION) + + GET_FILENAME_COMPONENT(_laname ${_target_location} NAME_WE) + GET_FILENAME_COMPONENT(_soname ${_target_location} NAME) + SET(_laname ${CMAKE_CURRENT_BINARY_DIR}/${_laname}.la) + + FILE(WRITE ${_laname} "# ${_laname} - a libtool library file, generated by cmake \n") + FILE(APPEND ${_laname} "# The name that we can dlopen(3).\n") + FILE(APPEND ${_laname} "dlname='${_soname}'\n") + FILE(APPEND ${_laname} "# Names of this library\n") + FILE(APPEND ${_laname} "library_names='${_soname} ${_soname} ${_soname}'\n") + FILE(APPEND ${_laname} "# The name of the static archive\n") + FILE(APPEND ${_laname} "old_library=''\n") + FILE(APPEND ${_laname} "# Libraries that this one depends upon.\n") + FILE(APPEND ${_laname} "dependency_libs=''\n") +# FILE(APPEND ${_laname} "dependency_libs='${${_target}_LIB_DEPENDS}'\n") + FILE(APPEND ${_laname} "# Version information.\ncurrent=0\nage=0\nrevision=0\n") + FILE(APPEND ${_laname} "# Is this an already installed library?\ninstalled=yes\n") + FILE(APPEND ${_laname} "# Should we warn about portability when linking against -modules?\nshouldnotlink=yes\n") + FILE(APPEND ${_laname} "# Files to dlopen/dlpreopen\ndlopen=''\ndlpreopen=''\n") + FILE(APPEND ${_laname} "# Directory that this library needs to be installed in:\n") + FILE(APPEND ${_laname} "libdir='${CMAKE_INSTALL_PREFIX}/lib/kde3'\n") + + INSTALL( + FILES ${_laname} + DESTINATION ${_destination} + ) + +ENDMACRO(GTKQT_KDE3_INSTALL_LIBTOOL_FILE) \ No newline at end of file -- cgit v1.2.1