summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorJeremy Koritzinsky <jekoritz@microsoft.com>2019-05-03 17:56:20 -0700
committerGitHub <noreply@github.com>2019-05-03 17:56:20 -0700
commit1ffcf98bc8fceff36b52cd97f9228af4a3748f08 (patch)
tree2d70714a2a4f5a3dd56aec4eb52866b1669e93de /src/tools
parenta64d7a8aa558773bd57bafbbf91d5294de59ad5d (diff)
downloadcoreclr-1ffcf98bc8fceff36b52cd97f9228af4a3748f08.tar.gz
coreclr-1ffcf98bc8fceff36b52cd97f9228af4a3748f08.tar.bz2
coreclr-1ffcf98bc8fceff36b52cd97f9228af4a3748f08.zip
Use our local-built instances of tools from Microsoft.DotNet.BuildTools.CoreClr instead of using the package. (#24347)
* Use our local-built instances of tools from Microsoft.DotNet.BuildTools.CoreClr instead of using the package. * Fix const-correctness in InjectResource. * Build cross-arch native components before building native components for target arch. * Build InjectResource and GenClrDebugResource for the host arch when cross-building and import the targets into the cross-build. * install(EXPORT) in the directory where the target is created
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/CMakeLists.txt8
-rw-r--r--src/tools/GenClrDebugResource/CMakeLists.txt2
-rw-r--r--src/tools/InjectResource/CMakeLists.txt4
-rw-r--r--src/tools/InjectResource/InjectResource.cpp4
4 files changed, 15 insertions, 3 deletions
diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
index 5443e0ddb6..cd6c9766aa 100644
--- a/src/tools/CMakeLists.txt
+++ b/src/tools/CMakeLists.txt
@@ -1 +1,9 @@
add_subdirectory(crossgen)
+if (WIN32 AND NOT CLR_CMAKE_CROSS_ARCH)
+ add_subdirectory(GenClrDebugResource)
+ add_subdirectory(InjectResource)
+
+ if (CLR_CROSS_COMPONENTS_BUILD)
+ install(EXPORT dactabletools DESTINATION dactabletools)
+ endif()
+endif()
diff --git a/src/tools/GenClrDebugResource/CMakeLists.txt b/src/tools/GenClrDebugResource/CMakeLists.txt
index ad2598a373..9efed80ddc 100644
--- a/src/tools/GenClrDebugResource/CMakeLists.txt
+++ b/src/tools/GenClrDebugResource/CMakeLists.txt
@@ -5,3 +5,5 @@ target_link_libraries(GenClrDebugResource
${STATIC_MT_CRT_LIB}
${STATIC_MT_VCRT_LIB}
)
+
+install(TARGETS GenClrDebugResource EXPORT dactabletools DESTINATION dactabletools)
diff --git a/src/tools/InjectResource/CMakeLists.txt b/src/tools/InjectResource/CMakeLists.txt
index a4fd538662..71d871e295 100644
--- a/src/tools/InjectResource/CMakeLists.txt
+++ b/src/tools/InjectResource/CMakeLists.txt
@@ -7,4 +7,6 @@ add_executable(InjectResource InjectResource.cpp)
target_link_libraries(InjectResource
${STATIC_MT_CRT_LIB}
${STATIC_MT_VCRT_LIB}
-) \ No newline at end of file
+)
+
+install(TARGETS InjectResource EXPORT dactabletools DESTINATION dactabletools)
diff --git a/src/tools/InjectResource/InjectResource.cpp b/src/tools/InjectResource/InjectResource.cpp
index 1d5470f3f9..9f4d483a8b 100644
--- a/src/tools/InjectResource/InjectResource.cpp
+++ b/src/tools/InjectResource/InjectResource.cpp
@@ -14,7 +14,7 @@ char* g_appName;
void
AddBinaryResourceToDll(__in_z char* dllName,
- __in_z char* resName,
+ __in_z const char* resName,
PVOID resData,
ULONG resDataSize)
{
@@ -34,7 +34,7 @@ AddBinaryResourceToDll(__in_z char* dllName,
}
if (!UpdateResourceA(dllUpdate,
- RT_RCDATA,
+ (LPCSTR)RT_RCDATA,
resName,
MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL),
resData,