blob: ae030d7516d3c36e8d05e6d4d1728406186e9fbd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
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)
add_custom_command(OUTPUT iface_genheader.h
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/iface_genheader.h.in
${CMAKE_CURRENT_BINARY_DIR}/iface_genheader.h
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/iface_genheader.h.in
VERBATIM)
add_library(iface_genheader INTERFACE iface_genheader.h)
|