2009/5/5 Florent Lagaye <[email protected]>: > Hi everybody, > > I'm a big cmake fan, I use to generate kdevelop projects and makefile. > Now that my application as achieved an "acceptable" completion level, I > think about deployment. > > So, I started using CPack from within CMake (2.6) (via my CMakeLists.txt > file). But I can't manage to build an rpm package. > > Here is my CMakeLists.txt file : > > [code] > cmake_minimum_required(VERSION 2.6) > > PROJECT( viewer4d ) > > SET( VERSION 1.0.0 ) > > SET( ${PROJECT_NAME}_MAJOR_VERSION 1 ) > SET( ${PROJECT_NAME}_MINOR_VERSION 0 ) > SET( ${PROJECT_NAME}_PATCH_LEVEL 0 ) > > SET( PACKAGE_VERSION > ${viewer4d_MAJOR_VERSION}.${viewer4d_MINOR_VERSION}.${viewer4d_PATCH_LEVEL} > ) > SET( CPACK_PACKAGE_VERSION_MAJOR ${viewer4d_MAJOR_VERSION} ) > SET( CPACK_PACKAGE_VERSION_MINOR ${viewer4d_MINOR_VERSION} ) > SET( CPACK_PACKAGE_VERSION_PATCH ${viewer4d_PATCH_LEVEL} ) > SET( CPACK_PACKAGE_VERSION > ${viewer4d_MAJOR_VERSION}.${viewer4d_MINOR_VERSION}.${viewer4d_PATCH_LEVEL} > ) > SET( CPACK_PACKAGE_DESCRIPTION_SUMMARY "A 4D viewer") > SET( CPACK_PACKAGE_VENDOR "INRIA - Florent LAGAYE") > SET( CPACK_SOURCE_PACKAGE_FILE_NAME "viewer4d-${VERSION}" CACHE INTERNAL > "tarball basename" ) > SET(CPACK_SOURCE_IGNORE_FILES > "~$" > "^${PROJECT_SOURCE_DIR}.*/.svn/" > ) > [...]
> ) > [/code] I didn't see INCLUDE(CPack) in your CMakeLists.txt, I must be there in order to make CPack work. You should INCLUDE(CPack) after your have defined you own CPACK_xxxx vars. > > And here is what "make viewer4d_rpm" tells me : > You are trying to use UseRPMTools.cmake instead of the builtin CMake/CPack 2.6 RPM support, see: http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#RPM_.28Unix_Only.29 > What am I missing here ? With CPack 2.6 you should be able to do: cd /to/build_dir cpack -G RPM or you may set SET(CPACK_GENERATOR "TGZ;ZIP;RPM") or any list of appropriate CPack generator you want to use when launching make package. -- Erk _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
