From 310add559b1636a29abc4d72122d0443875b1fd9 Mon Sep 17 00:00:00 2001 From: Roberto Di Remigio Date: Thu, 17 Nov 2016 19:51:17 +0100 Subject: [PATCH] Path to git_info.h.in is no longer hardcoded --- modules/git_info/git_info.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/git_info/git_info.cmake b/modules/git_info/git_info.cmake index f499ddc..cc292e5 100644 --- a/modules/git_info/git_info.cmake +++ b/modules/git_info/git_info.cmake @@ -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 )