Bug 261132

Summary: Installation uses /usr/local when /usr is specified
Product: [Applications] kmymoney Reporter: Thomas Baumgart <tbaumgart>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Thomas Baumgart 2010-12-24 10:20:30 UTC
Version:           unspecified (using KDE 1.2) 
OS:                Linux

After running cmake in a fresh build environment, the CMAKE_INSTALL_PREFIX is set to /usr but when running 'make install' things get installed in /usr/local.

Reproducible: Always

Steps to Reproduce:
Create an empty build sub-directory. cd into this directory. Run 'cmake ..'. No need to actually compile anything.

Actual Results:  
The setting is correct, but generated files don't contain it.


thb@localhost:~/tmp/kmymoney-4.5.2/build> grep INSTALL_PREFIX CMakeCache.txt CMAKE_INSTALL_PREFIX:PATH=/usr

thb@localhost:~/tmp/kmymoney-4.5.2/build> grep "INSTALL DESTINATION" kmymoney/cmake_install.cmake | head -n 1
  FILE(INSTALL DESTINATION "/usr/local/bin" TYPE EXECUTABLE FILES "/home/thb/tmp/kmymoney-4.5.2/build/kmymoney/CMakeFiles/CMakeRelink.dir/kmymoney")


Expected Results:  
thb@localhost:~/tmp/kmymoney-4.5.2/build> grep INSTALL_PREFIX CMakeCache.txt CMAKE_INSTALL_PREFIX:PATH=/usr

thb@localhost:~/tmp/kmymoney-4.5.2/build> grep "INSTALL DESTINATION" kmymoney/cmake_install.cmake | head -n 1
  FILE(INSTALL DESTINATION "/usr/bin" TYPE EXECUTABLE FILES "/home/thb/tmp/kmymoney-4.5.2/build/kmymoney/CMakeFiles/CMakeRelink.dir/kmymoney")


Removing all 'cmake_install.cmake' with 'find . -name cmake_install.cmake  | xargs rm' after running 'cmake ..' the first time and re-running 'cmake ..' solves the problem.
Comment 1 Thomas Baumgart 2010-12-24 11:28:51 UTC
SVN commit 1209041 by tbaumgart:

setup default CMAKE_INSTALL_PREFIX before calling FIND_PACKAGE(KDE4)

BUG: 261132

 M  +9 -5      CMakeLists.txt  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1209041
Comment 2 Thomas Baumgart 2010-12-24 11:38:49 UTC
SVN commit 1209043 by tbaumgart:

setup default CMAKE_INSTALL_PREFIX before calling FIND_PACKAGE(KDE4)

Backported to stable branch

BUG: 261132

 M  +9 -5      CMakeLists.txt  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1209043