vcpkg/ports/bond/0003_rename_gbc_during_install.patch
Christopher Warrington cd44f88573 Install gbc.exe to tools/
This at least allows people to write their own codegen rules until Bond
includes its own.
2017-02-08 19:38:10 -08:00

23 lines
544 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0d743da4..72d62c5e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,7 +49,14 @@ install (EXPORT bond
# if BOND_GBC_PATH is set we must copy over that gbc to the install location
if (BOND_GBC_PATH)
- install (FILES
- ${BOND_GBC_PATH}
- DESTINATION bin)
+ if (WIN32)
+ set(INSTALLED_GBC_NAME gbc.exe)
+ else()
+ set(INSTALLED_GBC_NAME gbc)
+ endif()
+
+ install (
+ FILES ${BOND_GBC_PATH}
+ DESTINATION bin
+ RENAME ${INSTALLED_GBC_NAME})
endif()