[cmake-developers] [CMake 0014819]: excluding ARCHIVE part of library target from install
Mantis Bug Tracker
mantis at public.kitware.com
Thu Mar 20 04:44:53 EDT 2014
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=14819
======================================================================
Reported By: Richard Ulrich
Assigned To:
======================================================================
Project: CMake
Issue ID: 14819
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-03-20 04:44 EDT
Last Modified: 2014-03-20 04:44 EDT
======================================================================
Summary: excluding ARCHIVE part of library target from
install
Description:
When building shared libraries on windows, I can specify the install location
for the dll and lib file like this:
INSTALL(TARGETS MyLib
RUNTIME DESTINATION bin # -> dll
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib # -> lib
COMPONENT base
)
Now I should exclude the lib files from the generated installer.
As long as we used an external installer builder that I invoked with
ADD_CUSTOM_TARGET(), I just executed an ADD_CUSTOM_COMMAND() just before, that
deleted the lib files from the install directory.
But now that we use cpack to generate the installer, there is no suc
interception point anymore.
So the next thing I tried was what I found in
http://stackoverflow.com/questions/8636479/postpone-making-custom-target-until-install
:
INSTALL(CODE "EXECUTE_PROCESS(
COMMAND del /F /Q ${TEMP2_CMAKE_INSTALL_PREFIX}\\\\bin\\\\*.lib
)")
But that doesn't work, as it is executed too early.
I also searched if there are cpack options to exclude certain files, but the
only thing I found were filters for source files, but nothing for target files.
Anyway, I think the option to exclude the import libraries from target installs
should exist without such hacks.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-03-20 04:44 Richard Ulrich New Issue
======================================================================
More information about the cmake-developers
mailing list