CMAKE_INSTALL_PREFIX doesn't work
Ralf Habacker
ralf.habacker at freenet.de
Tue Jun 5 12:50:39 BST 2007
Andreas Pakulat schrieb:
> On 04.06.07 18:50:29, Alexander Neundorf wrote:
>
>> On Monday 04 June 2007 10:10, Andreas Pakulat wrote:
>>
>>> Hi,
>>>
>>> while creating the content for the new kdevplatform module I found that
>>> CMAKE_INSTALL_PREFIX doesn't work as expected. When setting
>>> CMAKE_INSTALL_PREFIX to /home/andreas/kdevplatform while running cmake:
>>>
>>> cmake -DCMAKE_INSTALL_PREFIX=/home/andreas/kdevplatform/
>>>
>>> the make install still installs most of the stuff into the kdelibs
>>>
>> What is "most stuff" ? What went into the CMAKE_INSTALL_PREFIX and what went
>> to the kdelibs install location ?
>>
>
> Only services and servicetypes went into CMAKE_INSTALL_PREFIX,
> everything else, i.e. binaries, libs, header and data went into the
> kdelibs install location.
>
>
>>> prefix, the cmake_install.cmake files all contain /home/andreas/kde4
>>> instead of /home/andreas/kdevplatform. Even after setting
>>> CMAKE_INSTALL_PREFIX to /home/andreas/kdevplatform before finding KDE4
>>> the issue persists.
>>>
>> This is with current kdelibs, right ?
>>
>
> Yes, I didn't do a full rebuild today yet, but yesterday.
>
>
>> I suspect this is the change requested by Coolo:
>> http://lists.kde.org/?l=kde-core-devel&m=118053177811625&w=2
>> Please check whether FindKDE4Internal.cmake rev. 668049 works as you expect.
>>
>> This is no cmake bug, this is an issue of our cmake script files.
>>
>
> Ok, will try that tomorrow.
>
>
I tried with recent kdelibs source and are only able to install to
another location with the following changes
_set_fancy(SHARE_INSTALL_PREFIX ./share "Base directory for
files which go to share/")
_set_fancy(EXEC_INSTALL_PREFIX . "Base directory for
executables and libraries")
....
_set_fancy(INCLUDE_INSTALL_DIR
"${EXEC_INSTALL_PREFIX}/include" "The subdirectory to the header
prefix")
The resulting cmake_install.cmake looks like
....
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/./lib" TYPE
STATIC_LIBRARY OPTIONAL FILES
"D:/daten/kdelibs-mingw-build/bin/libkdecore.dll.a")
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/./lib" TYPE
SHARED_LIBRARY FILES "D:/daten/kdelibs-mingw-build/bin/libkdecore.dll")
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/./bin" TYPE EXECUTABLE
FILES "D:/daten/kdelibs-mingw-build/bin/kde4-config.exe")
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/./lib/kde4" TYPE
MODULE FILES "D:/daten/kdelibs-mingw-build/bin/ktranscript.dll")
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/./share/locale" TYPE
FILE FILES "D:/daten/kdelibs-mingw-build/kdecore/all_languages")
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/./share/config" TYPE
FILE FILES "D:/daten/kdelibs/kdecore/kdebug.areas")
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/./share/config
which works so far. Please note the additional './', which let me
assume that at least on win32 only pathes relative to the installation
root should be used
_set_fancy(EXEC_INSTALL_PREFIX "" "Base directory
for executables and libraries")
_set_fancy(SHARE_INSTALL_PREFIX "share" "Base directory for
files which go to share/")
_set_fancy(BIN_INSTALL_DIR "bin" "")
_set_fancy(SBIN_INSTALL_DIR "sbin" "")
_set_fancy(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" "")
_set_fancy(LIBEXEC_INSTALL_DIR "${BIN_INSTALL_DIR}" "")
_set_fancy(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/kde4" "")
_set_fancy(INCLUDE_INSTALL_DIR "include" "")
just my 2 cent
Ralf
More information about the kde-core-devel
mailing list