[CMake] Trouble with "INSTALL" command and CPACK (CMake 2.6.4)

Mike Jackson mike.jackson at bluequartz.net
Fri Nov 13 15:09:58 EST 2009


 I have the following bit of CMake code.

INSTALL(TARGETS ${MXADATAMODEL_LIB_NAME}
    LIBRARY DESTINATION bin
    ARCHIVE DESTINATION lib
    RUNTIME DESTINATION lib
    COMPONENT SDKLibrary
)

Using Visual Studio and the NSIS installer, when I generate an
installer on a Static library build the library is NOT installed. If I
generate a Shared Library instead and then run the PACKAGE project
from Visual Studio then the DLL is packaged correctly.

If I have instead the following:
INSTALL(TARGETS ${MXADATAMODEL_LIB_NAME}
    ARCHIVE DESTINATION lib
    COMPONENT SDKLibrary
)

Then the Static Library build seems to work correctly. So, I am still
coming up to speed with CPack and the installer and all that so what
am I doing wrong?

Oh, If I build the "INSTALL" project from Visual Studio on the
original code at the top, then the library (whether static or dynamic)
is installed correctly. Help.
_________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio


More information about the CMake mailing list