2006-02-19 21:10:25 +03:00
|
|
|
# Simulate in-source build include-file behavior for out-of-source
|
|
|
|
# builds.
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR 1)
|
2006-02-19 21:10:25 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated.h
|
2012-08-13 21:42:58 +04:00
|
|
|
COMMAND
|
2006-01-09 22:56:29 +03:00
|
|
|
${CMAKE_COMMAND} ARGS -E
|
2012-08-13 21:42:58 +04:00
|
|
|
copy ${CMAKE_CURRENT_SOURCE_DIR}/generated.h.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/generated.h
|
2006-01-09 22:56:29 +03:00
|
|
|
)
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
add_library(GeneratedHeader main.cpp ${CMAKE_CURRENT_BINARY_DIR}/generated.h)
|
2012-08-13 21:42:58 +04:00
|
|
|
|