[cmake-developers] Pssible documentation error in install(TARGETS ) signature
Daniel Wirtz
daniel.wirtz at simtech.uni-stuttgart.de
Tue Feb 16 17:42:39 EST 2016
The current CMake version has an error in the Documentation (or a Bug in the Code, depending on how this turns out).
In https://cmake.org/cmake/help/v3.5/command/install.html#installing-targets,
the optional argument order is
[...]
[INCLUDES DESTINATION [<dir> ...]]
[PERMISSIONS permissions...]
[CONFIGURATIONS [Debug|Release|...]]
[COMPONENT <component>]
[...]
if i use that in the order as documented, e.g.
install(TARGETS mytarget
EXPORT myexport
RUNTIME DESTINATION bin
COMPONENT Runtime
ARCHIVE DESTINATION lib
INCLUDES DESTINATION include
COMPONENT Runtime
),
the resulting cmake_install.cmake file will contain the install type "Unspecified" for my .lib archives (using windows)
i have to change the order of the arguments (using COMPONENT before INCLUDES DESTINATION):
install(TARGETS mytarget
EXPORT myexport
RUNTIME DESTINATION bin
COMPONENT Runtime
ARCHIVE DESTINATION lib
COMPONENT Runtime # Note swap here
INCLUDES DESTINATION include # Note swap here
)
then it correctly puts "Runtime" in the cmake_install.cmake file.
if the order of the arguments matters: update documentation?
if the order does not matter: could be a bug in the parser (two-element keyword INCLUDES DESTINATION?)?
any opinions welcome ..
Best,
Daniel
--
Dr. Daniel Wirtz
Dipl. Math. Dipl. Inf.
SRC SimTech
Pfaffenwaldring 5a, D-70569 Stuttgart
+49 (711) 685-60044
More information about the cmake-developers
mailing list