Files
CMake/Tests/RunCMake/install/TARGETS-Defaults-all-check.cmake
Kyle Edwards 9442ae5083 install: Fix regression when using default destinations
In commit 9fc20a4f3e (install: Add sane set of defaults for DESTINATION
and file type parameters, 2018-11-02, v3.14.0-rc1~410^2~1), a regression
was introduced, in which an `install(TARGETS)` with a
RUNTIME/LIBRARY/ARCHIVE DESTINATION but no PUBLIC_HEADER/PRIVATE_HEADER
DESTINATION would then install the headers.  The old behavior did not do
this.  Restore the old behavior.

Fixes: #20326
2020-02-11 08:34:16 -05:00

53 lines
1.0 KiB
CMake

if(WIN32)
set(_check_files
[[bin]]
[[bin/exe\.exe]]
[[bin/(lib)?lib1\.dll]]
[[include]]
[[include/obj1\.h]]
[[include/obj2\.h]]
[[include/obj3\.h]]
[[lib]]
[[lib/(lib)?lib1\.(dll\.a|lib)]]
[[lib/(lib)?lib2\.(a|lib)]]
[[lib3]]
[[lib3/(lib)?lib3\.(dll\.a|lib)]]
[[lib4]]
[[lib4/(lib)?lib4\.dll]]
)
elseif(CYGWIN)
set(_check_files
[[bin]]
[[bin/cyglib1\.dll]]
[[bin/exe\.exe]]
[[include]]
[[include/obj1\.h]]
[[include/obj2\.h]]
[[include/obj3\.h]]
[[lib]]
[[lib/liblib1\.dll\.a]]
[[lib/liblib2\.a]]
[[lib3]]
[[lib3/liblib3\.dll\.a]]
[[lib4]]
[[lib4/cyglib4\.dll]]
)
else()
set(_check_files
[[bin]]
[[bin/exe]]
[[include]]
[[include/obj1\.h]]
[[include/obj2\.h]]
[[include/obj3\.h]]
[[lib]]
[[lib/liblib1\.(dylib|so)]]
[[lib/liblib2\.a]]
[[lib3]]
[[lib3/liblib3\.(dylib|so)]]
[[lib4]]
[[lib4/liblib4\.(dylib|so)]]
)
endif()
check_installed("^${_check_files}$")