Skip to content

Commit

Permalink
revert ignition prefix
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina authored and methylDragon committed Jun 20, 2022
1 parent 8e7bba6 commit 9efff55
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmake/IgnConfigureProject.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,14 @@ macro(gz_configure_project)
# Extract the designation
#============================================================================
set(IGN_DESIGNATION ${PROJECT_NAME})
# Remove the leading project prefix (assume "gz-")
string(REGEX REPLACE "gz-" "" IGN_DESIGNATION ${IGN_DESIGNATION})
# Remove the leading project prefix ("gz-" by default)
set(PROJECT_PREFIX "gz")
# Also support "ignition-"
# TODO: remove this `if` block once all package names start with gz
if(${IGN_DESIGNATION} MATCHES "^ignition-")
set(PROJECT_PREFIX "ignition")
endif()
string(REGEX REPLACE "${PROJECT_PREFIX}-" "" IGN_DESIGNATION ${IGN_DESIGNATION})

# Remove the trailing version number
string(REGEX REPLACE "[0-9]+" "" IGN_DESIGNATION ${IGN_DESIGNATION})
Expand Down

0 comments on commit 9efff55

Please sign in to comment.