CMake/Tests/CustomCommand/GeneratedHeader/CMakeLists.txt

14 lines
388 B
CMake
Raw Normal View History

# 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
2006-01-09 22:56:29 +03:00
${CMAKE_COMMAND} ARGS -E
copy ${CMAKE_CURRENT_SOURCE_DIR}/generated.h.in
${CMAKE_CURRENT_BINARY_DIR}/generated.h
2006-01-09 22:56:29 +03:00
)
add_library(GeneratedHeader main.cpp ${CMAKE_CURRENT_BINARY_DIR}/generated.h)