CMake: correct generated location for buildinfo.h

This commit is contained in:
Campbell Barton 2015-07-19 09:53:38 +10:00
parent 1e10e4e2e3
commit 23c76039d9

@ -165,20 +165,20 @@ if(WITH_BUILDINFO)
# except when used as an include path.
# include the output directory, where the buildinfo.h file is generated
include_directories(${CMAKE_BINARY_DIR}/source/creator)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
# a custom target that is always built
add_custom_target(buildinfo ALL
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/buildinfo.h)
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/buildinfo.h)
# creates svnheader.h using cmake script
add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/buildinfo.h
# creates buildinfo.h using cmake script
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/buildinfo.h
COMMAND ${CMAKE_COMMAND}
-DSOURCE_DIR=${CMAKE_SOURCE_DIR}
-P ${CMAKE_SOURCE_DIR}/build_files/cmake/buildinfo.cmake)
# buildinfo.h is a generated file
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/buildinfo.h
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/buildinfo.h
PROPERTIES GENERATED TRUE
HEADER_FILE_ONLY TRUE)