Skip to content

Commit

Permalink
Take into account that Gem needs to be installed first, before using …
Browse files Browse the repository at this point in the history
…it to install further packages.
  • Loading branch information
lbaehren committed Apr 24, 2012
1 parent bd7f6c0 commit 41cce02
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
6 changes: 5 additions & 1 deletion environment/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,8 @@ endif (APPLE)
##__________________________________________________________
## Installation of Ruby Gems

include (${CMAKE_CURRENT_SOURCE_DIR}/RubyGems.cmake)
if (GEM_EXECUTABLE)

include (${CMAKE_CURRENT_SOURCE_DIR}/RubyGems.cmake)

endif (GEM_EXECUTABLE)
11 changes: 11 additions & 0 deletions environment/PackagesDebian.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ if (APT_EXECUTABLE AND DPKG_EXECUTABLE)
rubygems
rdoc
ri
rake
irb
libmysql-ruby${REQUIRED_VERSION_RUBY}
libtermios-ruby${REQUIRED_VERSION_RUBY}
Expand Down Expand Up @@ -62,5 +63,15 @@ if (APT_EXECUTABLE AND DPKG_EXECUTABLE)
)

endforeach (varPackage)

## Update the Ruby Gems

add_custom_command (
TARGET InstallPackages
POST_BUILD
COMMAND env REALLY_GEM_UPDATE_SYSTEM=1 gem update --system
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Updating Ruby gems ..."
)

endif (APT_EXECUTABLE AND DPKG_EXECUTABLE)

0 comments on commit 41cce02

Please sign in to comment.