hi all,
i'm having troubles with the midl compiler of generated msvc2013 project
files: the generated projects contain a hardcoded output directory:
$(IntDir). however having this property, the midl call fails for me. if
i remove this property, or replace it with $(ProjectDir)/$(IntDir) it
compiles fine.
attached patch resolves this issue for me, though i'm not sure if this
is a good solution in general. also, have to add this include directory:
"${CMAKE_CURRENT_BINARY_DIR}/MyProject.dir/${CMAKE_CFG_INTDIR}"
i'm not an expert on msvc toolchains, so it would be great if someone
could review this patch.
thanks,
tim
From a9f83bd54c8d7e073c4d8faee7e5b8dd68738fdc Mon Sep 17 00:00:00 2001
From: Tim Blechmann <[email protected]>
Date: Thu, 19 Feb 2015 14:35:02 +0800
Subject: [PATCH] cmake: Midl - set OutputDir via absolute path
---
Source/cmVisualStudio10TargetGenerator.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx
b/Source/cmVisualStudio10TargetGenerator.cxx
index b265c0e..6c09702 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2509,7 +2509,7 @@ WriteMidlOptions(std::string const& /*config*/,
}
this->WriteString("%(AdditionalIncludeDirectories)"
"</AdditionalIncludeDirectories>\n", 0);
- this->WriteString("<OutputDirectory>$(IntDir)</OutputDirectory>\n", 3);
+
this->WriteString("<OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>\n",
3);
this->WriteString("<HeaderFileName>%(Filename).h</HeaderFileName>\n", 3);
this->WriteString(
"<TypeLibraryName>%(Filename).tlb</TypeLibraryName>\n", 3);
--
2.3.0
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers