[CMake] problem with installing files

Alexander Neundorf a.neundorf-work at gmx.net
Fri Dec 9 15:11:50 EST 2005


Hi, 
 
I need to rename files during the install process. 
FILES(INSTALL ...) doesn't support this. 
So I tried the following: 
 
ADD_CUSTOM_TARGET(install_icons ) 
SET_TARGET_PROPERTIES(install_icons PROPERTIES POST_INSTALL_SCRIPT 
install_icons.cmake ) 
 
Then install_icons.cmake is filled with commands like the following: 
 
CONFIGURE_FILE(<install_dir>/newname <source_dir>/original_name COPYONLY) 
 
The problem is that when installing this cmake complains: 
 
CMake Error: Error required internal CMake variable not set, cmake may be 
not be built correctly. 
Missing variable is: CMAKE_BACKWARDS_COMPATIBILITY 
 
In cmConfigureFileCommand.cxx there is: 
  const char* versionValue 
    = m_Makefile->GetRequiredDefinition("CMAKE_BACKWARDS_COMPATIBILITY"); 
 
This probably causes the error. 
I tried to insert a  
SET(CMAKE_BACKWARDS_COMPATIBILITY="2.2" 
in the install_icons.cmake file, but this didn't change anything. 
 
I have to rename the files during install, these are the KDE icon files, 
which have names like "hi32-app-kpager.png", which means it has to be 
install to ${INSTALL_PREFIX}/share/icons/hicolor/32x32/apps/kpager.png" 
 
Do you have any suggestions ? 
 
Bye 
Alex 
 

-- 
10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail
+++ GMX - die erste Adresse für Mail, Message, More +++


More information about the CMake mailing list