Files
CMake/Tests/RunCMake/install/TARGETS-InstallFromSubDir.cmake
Zack Galbreath e89ad0f94e install: Allow installing targets created in another directory
Previously, `install(TARGETS)` would only accept targets created in the same
directory scope.  Relax this restriction by searching the global scope when
determining whether or not a target exists.

Fixes: #14444
2018-06-18 13:18:54 -04:00

5 lines
138 B
CMake

enable_language(C)
add_executable(myexe main.c)
add_subdirectory(TARGETS-InstallFromSubDir)
install(TARGETS myexe subexe DESTINATION bin)