I've been trying to use CPack to generate an RPM package with cmake 2.6.2.

I have the following trivial CMakeLists.txt:

############################################

PROJECT(PRINT)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

ADD_LIBRARY(print print.cpp)

SET(PRINTER_SRCS main.cpp)
ADD_EXECUTABLE(printer ${PRINTER_SRCS})
TARGET_LINK_LIBRARIES(printer print)

INSTALL(TARGETS printer print
        ARCHIVE DESTINATION print
        LIBRARY DESTINATION print
        RUNTIME DESTINATION print)

SET(CPACK_PACKAGE_NAME "print")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "print-package")
SET(CPACK_GENERATOR "RPM")
INCLUDE(CPack)

###################################

Regardless of what I put in CPACK_PACKAGE_INSTALL_DIRECTORY, the generated
rpm installs into /usr/print.

Can someone tell me what I would have to do to install into, say, /opt ?
_______________________________________________
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

Reply via email to