install: Remove error condition using INCLUDES DESTINATION without EXPORT.

Commit 650e61f8 (Add a convenient way to add the includes install
dir to the INTERFACE., 2013-01-05) introduced an error case for
using the install(TARGETS) command with specified INCLUDES DESTINATION,
but no specified EXPORT set.

It is convenient to use a variable to set the various destinations
for different outputs (as KDE does), and some targets such as
executables are installed but not exported. This was triggering
the error case, but as it is a common case, remove the error.
This commit is contained in:
Stephen Kelly 2013-07-29 15:16:15 +02:00
parent 650e61f833
commit 72d13ff482
5 changed files with 0 additions and 17 deletions

View File

@ -295,13 +295,6 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
return false; return false;
} }
if(!includesArgs.GetIncludeDirs().empty() && exports.GetString().empty())
{
this->SetError("TARGETS given INCLUDES DESTINATION, but EXPORT set "
"not specified.");
return false;
}
// Enforce argument rules too complex to specify for the // Enforce argument rules too complex to specify for the
// general-purpose parser. // general-purpose parser.
if(archiveArgs.GetNamelinkOnly() || if(archiveArgs.GetNamelinkOnly() ||

View File

@ -9,4 +9,3 @@ run_cmake(RelativePathInInterface)
run_cmake(ImportedTarget) run_cmake(ImportedTarget)
run_cmake(RelativePathInGenex) run_cmake(RelativePathInGenex)
run_cmake(CMP0021) run_cmake(CMP0021)
run_cmake(TargetInterfaceIncludes)

View File

@ -1,4 +0,0 @@
CMake Error at TargetInterfaceIncludes.cmake:3 \(install\):
install TARGETS given INCLUDES DESTINATION, but EXPORT set not specified.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)

View File

@ -1,4 +0,0 @@
add_library(empty empty.cpp)
install(TARGETS empty DESTINATION lib INCLUDES DESTINATION include)
# install(EXPORT )