CMakeLists.txt 394 Bytes
Newer Older
1
2
3
4
# Simulate in-source build include-file behavior for out-of-source
# builds.
SET(CMAKE_INCLUDE_CURRENT_DIR 1)

5
6
7
8
9
10
11
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 
)

12
ADD_LIBRARY(GeneratedHeader main.cpp ${CMAKE_CURRENT_BINARY_DIR}/generated.h) 
13