mirror of
https://github.com/reactos/CMake.git
synced 2024-12-13 22:58:41 +00:00
ac14cbf017
Revert commit v3.0.0-rc1~175^2~20 (add_dependencies: Disallow use with INTERFACE_LIBRARY, 2013-12-25). Teach our dependency analysis to transitively follow INTERFACE target utility dependencies as was done or IMPORTED targets in commit v2.8.6~127^2~1 (Allow add_dependencies() on imported targets, 2010-11-19). Extend the InterfaceLibrary test with a case to cover header generation for a header-only INTERFACE library via a custom target.
14 lines
390 B
CMake
14 lines
390 B
CMake
|
|
set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
|
|
|
|
add_library(headeriface INTERFACE)
|
|
|
|
add_custom_target(headeriface_gen
|
|
COMMENT "Generating iface_header_builddir.h"
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
${CMAKE_CURRENT_SOURCE_DIR}/iface_header_builddir.h.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/iface_header_builddir.h
|
|
VERBATIM
|
|
)
|
|
add_dependencies(headeriface headeriface_gen)
|