[CMake] Fwd: CPACK/NSIS: Subfolders/components related generation issue

Eric Noulard eric.noulard at gmail.com
Wed Jul 27 03:06:53 EDT 2011


2011/7/27 Laszlo Papp <lpapp at kde.org>:
> Hi Eric,
>
>> So the solution begins with DOT NOT USE ABSOLUTE INSTALL PATH,
>> give it a try and tell us how it goes.
>
> Thanks a lot for your answer. It has been very useful. The components
> seem much better for now after this change you were proposing:
> https://projects.kde.org/projects/playground/games/gluon/repository/revisions/master/entry/core/CMakeLists.txt#L19
>
> The bin/share/include directories are generated properly inside each
> component, but there is still some issue with the library part. There
> are no DLLs generated inside the components and I do not know why. It
> seems to me, like "${LIB_INSTALL_DIR}" is properly used in the install
> lines.
>
> Any thought ?

Yes I do:

install(
    TARGETS GluonCore
    RUNTIME DESTINATION bin
    LIBRARY DESTINATION ${LIB_INSTALL_DIR}
    ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
    FRAMEWORK DESTINATION ${LIB_INSTALL_DIR}
)

install(
    TARGETS GluonAudio
    RUNTIME DESTINATION bin
    LIBRARY DESTINATION ${LIB_INSTALL_DIR}
    ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
    FRAMEWORK DESTINATION ${LIB_INSTALL_DIR}
)

there is no COMPONENT specified at least for those two.

When something is install(...)ed without specifying a component then CMake put
them in the special "Unspecified" component which is builtin.

Now since you specify that you only want to package the following components:

#Component based settings
set(CPACK_COMPONENTS_ALL
    gluoncore
    gluonaudio
    gluoninput
    gluongraphics
    gluonengine
    gluonplayer
    gluonqtplayer
    gluoncreator
)

The "Unspecified" does not get packaged.

So the solution would be:

Verify ALL your install(...) statement in order to verify whether if
you specified the COMPONENT argument

and/or

add "Unspecified" to CPACK_COMPONENTS_ALL and check that this
component is empty.

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list