[Bf-blender-cvs] [23c7603] master: CMake: correct generated location for buildinfo.h
Campbell Barton
noreply at git.blender.org
Sun Jul 19 01:59:12 CEST 2015
Commit: 23c76039d9bf9425b299599cc40fbba0b02ae0a9
Author: Campbell Barton
Date: Sun Jul 19 09:53:38 2015 +1000
Branches: master
https://developer.blender.org/rB23c76039d9bf9425b299599cc40fbba0b02ae0a9
CMake: correct generated location for buildinfo.h
===================================================================
M source/creator/CMakeLists.txt
===================================================================
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 09d8569..2dc995a 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -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)
More information about the Bf-blender-cvs
mailing list