Hi,

I am trying CPack in visual studio. When I build "PACKAGE" it throws me an
error like this:

  CMake Error at C:/BuildDir1/src/cmake_install.cmake:38 (message):
    ABSOLUTE path INSTALL DESTINATION forbidden (by caller):

C:/BuildDir1/src/Debug/QtGuid4.dll;C:/BuildDir1/src/Debug/QtCored4.dll;C:/BuildDir1/src/Debug/reverse.dll
  Call Stack (most recent call first):
    C:/BuildDir1/cmake_install.cmake:33 (INCLUDE)

I cannot interpret this error, can you please help me?

I have written packaging related code only in my main cmakelist file. Its
content is given below

#Packing related code
SET (GENERATE_PACKAGE false CACHE BOOL "Do package generation?")
if(GENERATE_PACKAGE)
    #INCLUDE(InstallRequiredSystemLibraries)
    SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A Tutorial")
    SET(CPACK_PACKAGE_VENDOR "x")
    SET(CPACK_PACKAGE_DESCRIPTION_FILE
"${CMAKE_CURRENT_SOURCE_DIR}/Readme.txt")
    SET(CPACK_RESOURCE_FILE_LICENSE
"${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
    SET(CPACK_PACKAGE_VERSION_MAJOR "1")
    SET(CPACK_PACKAGE_VERSION_MINOR "0")
    SET(CPACK_PACKAGE_VERSION_PATCH "0")
    #SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Tutorial")
    IF(WIN32 AND NOT UNIX)

        set(CPACK_GENERATOR NSIS)
        set(CPACK_MONOLITHIC_INSTALL 1)
        #set(CPACK_RESOURCE_FILE_LICENSE "${ROOTDIR}/LICENSE")
        #set(CPACK_RESOURCE_FILE_README "${ROOTDIR}/README")
        set(CPACK_PACKAGE_EXECUTABLES "Tutorial" "My CMake Tutorial")
        include(CPack)

ENDIF(WIN32 AND NOT UNIX)
ENDIF(GENERATE_PACKAGE)

One of the install command present in my cmake file is also given below

INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/bin/Debug/Tutorial.exe
DESTINATION ${CPACK_PACKAGE_INSTALL_DIRECTORY} CONFIGURATIONS Debug)


Any guidance is much appreciated.

Thanks,
  Lloyd
--

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