I'm trying to create an RPM installer for my project using CPack. My environment is cmake-2.7 prerelease built from CVS on 2009-03-05 on a Fedora Core 10 32-bit x86 host. At the bottom of my top-level CMakeLists.txt file I have the following:<br>
<br># build an installer<br>include (InstallRequiredSystemLibraries)<br>set (CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/license.txt)<br>set (CPACK_PACKAGE_VERSION_MAJOR 1)<br>set (CPACK_PACKAGE_VERSION_MINOR 0)<br>
set (CPACK_GENERATOR RPM)<br>include (CPack)<br><br>I'm configuring for an out-of-src-tree build. After configuring/generating I cd to my build dir and do a "make -k" and "make -k install". <br><br>
[agooch@bwaagooch2 cmake-build]$ make -k<br>[agooch@bwaagooch2 cmake-build]$ make -k install<br><br>I then do a "cpack -C CPackConfig.cmake" and receive the following error:<br><br>[agooch@bwaagooch2 cmake-build]$ cpack -C CPackConfig.cmake <br>
CPack: Create package using RPM<br>CPack: Install projects<br>CPack: - Run preinstall target for: Server<br>CPack: - Install project: Server<br>CPack: Compress package<br>CPack: Finalize package<br>CPack Error: Problem copying the package: /home/agooch/sandboxes/sb1/mmo1/branch/_linuxport2/cmake-build/_CPack_Packages/Linux/RPM/Server-1.0.1-Linux.rpm to /home/agooch/sandboxes/sb1/mmo1/branch/_linuxport2/cmake-build/Server-1.0.1-Linux.rpm<br>
CPack Error: Error when generating package: Server<br>[agooch@bwaagooch2 cmake-build]$<br><br>The rpm source file attempting to be copied is indeed not present at the path specified. Instead the following path is found:<br>
<br>[agooch@bwaagooch2 cmake-build]$ pwd<br>/home/agooch/sandboxes/sb1/mmo1/branch/_linuxport2/cmake-build<br>[agooch@bwaagooch2 cmake-build]$ ls -al _CPack_Packages/Linux/RPM/Server-1.0.1-Linux/home/agooch/sandboxes/sb1/mmo1/branch/_linuxport2/cmake-install/bin/<br>
total 5700<br>drwxrwxr-x 2 agooch agooch 4096 2009-03-24 15:53 .<br>drwxrwxr-x 3 agooch agooch 4096 2009-03-24 15:53 ..<br>-rwxr-xr-x 1 agooch agooch 96892 2009-03-24 15:52 bootstrap<br>-rwxr-xr-x 1 agooch agooch 64898 2009-03-24 15:52 control<br>
-rwxr-xr-x 1 agooch agooch 19188 2009-03-24 15:52 genericapp<br>-rwxr-xr-x 1 agooch agooch 458444 2009-03-24 15:52 globaldirectory<br>-rwxr-xr-x 1 agooch agooch 953802 2009-03-24 15:52 libbiomonservice.so<br>-rwxr-xr-x 1 agooch agooch 73021 2009-03-24 15:52 libcontrolplugin.so<br>
-rwxr-xr-x 1 agooch agooch 3496116 2009-03-24 15:52 libomega.so<br>-rwxr-xr-x 1 agooch agooch 55279 2009-03-24 15:52 libxmlcontrolplugin.so<br>-rwxr-xr-x 1 agooch agooch 566650 2009-03-24 15:52 monitor<br>[agooch@bwaagooch2 cmake-build]$ <br>
<br>It seems that the absolute path to my install dir is being appended to the "_CPack_Packages/Linux/RPM/Server-1.0.1-Linux" path components, and the expected directory for the copy source does not exist. Anyone have any ideas on why this absolute/relative path name wackiness is happening and how to correctly generate the RPM?<br>
<br>Many thanks in advance,<br><br>Allen Gooch<br>BioWare<br><br>