Path to git_info.h.in is no longer hardcoded

This commit is contained in:
Roberto Di Remigio 2016-11-17 19:51:17 +01:00
parent 4efb243161
commit 310add559b
No known key found for this signature in database
GPG Key ID: E4FADFE6DFB29C6E

View File

@ -11,6 +11,8 @@
# fetch:
# - "%(url_root)modules/git_info/git_info.h.in"
get_filename_component(_current_dir ${CMAKE_CURRENT_LIST_FILE} PATH)
function(generate_git_info_header)
# _header_location: where the Git info header file should be generated
# _header_name: the Git info header name, complete with extension (.h, .hpp, .hxx or whatever)
@ -61,7 +63,7 @@ function(generate_git_info_header)
endif()
configure_file(
${PROJECT_SOURCE_DIR}/cmake/downloaded/git_info.h.in
${_current_dir}/git_info.h.in
${_header_location}/${_header_name}
@ONLY
)