Skip to content

Commit

Permalink
Rename pre-compiled gbc when installing
Browse files Browse the repository at this point in the history
The pre-compiled gbc may not be called "gbc" if the user specified the
CMake variable BOND_GBC_PATH, so we need to rename it to gbc when
installing.

Closes #324
  • Loading branch information
chwarr committed Feb 9, 2017
1 parent 64c5897 commit f5a1a95
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit f5a1a95

Please sign in to comment.