-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
813 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Generate a the ruby script. | ||
# Note that the major version of the library is included in the name. | ||
# Ex: cmdgazebo0.rb | ||
if (APPLE) | ||
set(IGN_LIBRARY_NAME lib${PROJECT_LIBRARY_TARGET_NAME}.dylib) | ||
else() | ||
set(IGN_LIBRARY_NAME lib${PROJECT_LIBRARY_TARGET_NAME}.so) | ||
endif() | ||
|
||
configure_file( | ||
"cmdgazebo.rb.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}/cmdgazebo${PROJECT_VERSION_MAJOR}.rb" @ONLY) | ||
|
||
# Install the ruby command line library in an unversioned location. | ||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmdgazebo${PROJECT_VERSION_MAJOR}.rb DESTINATION lib/ruby/ignition) | ||
|
||
set(ign_library_path | ||
"${CMAKE_INSTALL_PREFIX}/lib/ruby/ignition/cmdgazebo${PROJECT_VERSION_MAJOR}") | ||
|
||
# Generate a configuration file. | ||
# Note that the major version of the library is included in the name. | ||
# Ex: fuel0.yaml | ||
configure_file( | ||
"gazebo.yaml.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}/gazebo${PROJECT_VERSION_MAJOR}.yaml" @ONLY) | ||
|
||
# Install the yaml configuration files in an unversioned location. | ||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gazebo${PROJECT_VERSION_MAJOR}.yaml DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/ignition/) | ||
|
||
#=============================================================================== | ||
# Generate the ruby script for internal testing. | ||
# Note that the major version of the library is included in the name. | ||
# Ex: cmdgazebo0.rb | ||
set(cmd_script_generated_test "${CMAKE_BINARY_DIR}/test/lib/ruby/ignition/cmdgazebo${PROJECT_VERSION_MAJOR}.rb") | ||
set(cmd_script_configured_test "${cmd_script_generated_test}.configured") | ||
|
||
# Set the library_location variable to the full path of the library file within | ||
# the build directory. | ||
set(IGN_LIBRARY_NAME "$<TARGET_FILE:${PROJECT_LIBRARY_TARGET_NAME}>") | ||
|
||
configure_file( | ||
"cmdgazebo.rb.in" | ||
"${cmd_script_configured_test}" | ||
@ONLY) | ||
|
||
file(GENERATE | ||
OUTPUT "${cmd_script_generated_test}" | ||
INPUT "${cmd_script_configured_test}") | ||
|
||
# Used only for internal testing. | ||
set(ign_library_path "${CMAKE_BINARY_DIR}/test/lib/ruby/ignition/cmdgazebo${PROJECT_VERSION_MAJOR}") | ||
|
||
# Generate a configuration file for internal testing. | ||
# Note that the major version of the library is included in the name. | ||
# Ex: gazebo.yaml | ||
configure_file( | ||
"gazebo.yaml.in" | ||
"${CMAKE_BINARY_DIR}/test/conf/gazebo${PROJECT_VERSION_MAJOR}.yaml" @ONLY) |
Oops, something went wrong.