Standalone qt-dbus in kdesupport
Ralf Habacker
ralf.habacker at freenet.de
Fri Jun 9 12:15:36 BST 2006
Ralf Habacker schrieb:
> Ralf Habacker schrieb:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Paulo Moura Guedes schrieb:
>>
>>
>>> On Thursday 08 June 2006 22:21, Ralf Habacker wrote:
>>>
>>>
>>>> It is possible to set a different installation dir for make install ?
>>>>
>>>>
>>> You mean by default?
>>> You can set it explicitly with the variable CMAKE_INSTALL_PREFIX.
>>>
>>>
>> No. I meant by running make install. The package must be configured by
>> using the default
>>
>> make install prefix=<another-install-dir>
>>
>>
>> or
>>
>> make install CMAKE_INSTALL_PREFIX=<another-install-dir>
>>
>>
> Some additional notes:
>
> On automake based systems the generic way is to configure a package with
> a specific installation path (prefix=...) , which is used in several
> parts, for example rpath settings, config files and tools like
> kde-config and other.
>
> F:\daten\kdelibs-build>bin\kde-config --prefix
> C:\Programme\kdelibs
>
> on unix this will report probably /opt/kde4 or similar
>
> To make a binary package on unix for example rpm a source tar ball is
> unpacked by rpmbuild in a temporay location, compiled and installed in
> an temporary installation dir of wich the related files are packaged
> into the final rpm.
> Using a temporary installation dir is necessary because installing in
> the original cmake given install path would overwrite important files in
> the running os.
>
> rpmbuild uses
>
> make install prefix=<temporary-install-dir>
>
>
> On windows packaging goes similar. One will unpack a source tar ball or
> get the source from cvs, configure it with a specific installation path,
> compile it and install the result into a temporary directory, from which
> a zip archive or a graphical installer using Inno Setup or NSIS will be
> created.
>
> Hope that explains a little bit more the need for a temporary install
> path option for make install.
>
>
> BTW: I have send this answer to kde-buildsystem too because this is a
> build system issue.
>
I there any way to define a constant to cmake in install mode ?
# Special rule for the target install
install: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan
"Install the project..."
f:\cmake24\bin\cmake.exe -P cmake_install.cmake
I've added a message to the beginning of cmake_install.cmake
# Install script for directory: F:/daten/kdesupport/qt-dbus
MESSAGE(STATUS "install prefix" ${CMAKE_INSTALL_PREFIX})
# Set the install prefix
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
SET(CMAKE_INSTALL_PREFIX "C:/Programme/qt-dbus")
and run
f:\cmake24\bin\cmake.exe -P cmake_install.cmake
-DCMAKE_INSTALL_PREFIX:string="c:\test"
f:\cmake24\bin\cmake.exe -P cmake_install.cmake -D
CMAKE_INSTALL_PREFIX:string="c:\test"
but the constant is not set
-- install prefix
-- Install configuration: "Release"
-- Installing C:/Programme/qt-dbus/lib/pkgconfig/dbus-qt4-1.pc
-- Installing C:/Programme/qt-dbus/include/dbus-1.0/dbus/qdbus.h
-- Installing C:/Programme/qt-dbus/include/dbus-1.0/dbus/qdbusbus.h
-- Installing C:/Programme/qt-dbus/include/dbus-1.0/dbus/qdbusmacros.h
-- Installing C:/Programme/qt-dbus/include/dbus-1.0/dbus/qdbuserror.h
-- Installing C:/Programme/qt-dbus/include/dbus-1.0/dbus/qdbusmessage.h
-- Installing C:/Programme/qt-dbus/include/dbus-1.0/dbus/qdbusserver.h
If I change the path in cmake_install.cmake the
SET(CMAKE_INSTALL_PREFIX "C:/Programme/a")
files are installed into C:/Programme/a
F:\daten\kdesupport\qt-dbus-build>make install
Install the project...
-- install prefix
-- Install configuration: "Release"
-- Installing C:/Programme/a/lib/pkgconfig/dbus-qt4-1.pc
-- Installing C:/Programme/a/include/dbus-1.0/dbus/qdbus.h
-- Installing C:/Programme/a/include/dbus-1.0/dbus/qdbusbus.h
-- Installing C:/Programme/a/include/dbus-1.0/dbus/qdbusmacros.h
-- Installing C:/Programme/a/include/dbus-1.0/dbus/qdbuserror.h
-- Installing C:/Programme/a/include/dbus-1.0/dbus/qdbusmessage.h
-- Installing C:/Programme/a/include/dbus-1.0/dbus/qdbusserver.h
-- Installing C:/Programme/a/include/dbus-1.0/dbus/qdbusconnection.h
-- Installing C:/Programme/a/include/dbus-1.0/dbus/qdbusabstractinterface.h
-- Installing C:/Programme/a/include/dbus-1.0/dbus/qdbusinterface.h
-- Installing C:/Programme/a/include/dbus-1.0/dbus/qdbusutil.h
-- Installing C:/Programme/a/include/dbus-1.0/dbus/qdbusabstractadaptor.h
-- Installing C:/Programme/a/include/dbus-1.0/dbus/qdbusreply.h
-- Installing C:/Programme/a/include/dbus-1.0/dbus/qdbustypehelper_p.h
-- Installing C:/Programme/a/lib/libdbus-qt4-1.dll.a
-- Installing C:/Programme/a/bin/libdbus-qt4-1.dll
-- Installing C:/Programme/a/bin/dbus.exe
-- Installing C:/Programme/a/bin/dbuscpp2xml.exe
-- Installing C:/Programme/a/bin/dbusidl2cpp.exe
cmake show that the form of the definition must be okay
Command-Line Options
-C <initial-cache> = Pre-load a script to populate the cache.
-D <var>:<type>=<value> = Create a cmake cache entry.
-G <generator-name> = Specify a makefile generator.
and my question is if I have done something wring or does cmake not set
the related constant, wich would be the solution as far as I can see.
Ralf
More information about the kde-core-devel
mailing list