You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
388 B

# Simulate in-source build include-file behavior for out-of-source
# builds.
set(CMAKE_INCLUDE_CURRENT_DIR 1)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated.h
COMMAND
${CMAKE_COMMAND} ARGS -E
copy ${CMAKE_CURRENT_SOURCE_DIR}/generated.h.in
${CMAKE_CURRENT_BINARY_DIR}/generated.h
)
add_library(GeneratedHeader main.cpp ${CMAKE_CURRENT_BINARY_DIR}/generated.h)