From 6a6393c905bd5bdddfaf0eb666ee479eed54ec28 Mon Sep 17 00:00:00 2001 From: David Faure Date: Sat, 27 Aug 2011 09:42:26 +0200 Subject: Don't use a variable name that might be used in other files. myDir is also used in the Grantlee config file, so if Grantlee was found, this call failed. --- Modules/GenerateExportHeader.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake index 0f5c413..4eb67b5 100644 --- a/Modules/GenerateExportHeader.cmake +++ b/Modules/GenerateExportHeader.cmake @@ -215,7 +215,7 @@ macro(_test_compiler_has_deprecated) endif() endmacro() -set(myDir "${CMAKE_CURRENT_LIST_DIR}") +get_filename_component(_GENERATE_EXPORT_HEADER_MODULE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) macro(_DO_SET_MACRO_VALUES TARGET_LIBRARY) set(DEFINE_DEPRECATED) @@ -308,7 +308,7 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY) set(EXPORT_IMPORT_CONDITION ${TARGET_LIBRARY}_EXPORTS) endif() - configure_file("${myDir}/exportheader.cmake.in" "${EXPORT_FILE_NAME}" @ONLY) + configure_file("${_GENERATE_EXPORT_HEADER_MODULE_DIR}/exportheader.cmake.in" "${EXPORT_FILE_NAME}" @ONLY) endmacro() function(GENERATE_EXPORT_HEADER TARGET_LIBRARY) @@ -343,4 +343,4 @@ function(add_compiler_export_flags) set (EXTRA_FLAGS "${EXTRA_FLAGS} -fvisibility-inlines-hidden") endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_FLAGS}" PARENT_SCOPE) -endfunction() \ No newline at end of file +endfunction() -- cgit v0.12