Skip to content

Commit

Permalink
Always use GZ_ prefixed export base
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <[email protected]>
  • Loading branch information
methylDragon committed May 4, 2022
1 parent d0c212a commit f0a0d22
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
5 changes: 0 additions & 5 deletions cmake/Export.hh.in
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@
// TICKTOCK IGNITION ========================================================
// TODO(CH3): Remove on ticktock, supports defining IGNITION macros if we're
// a lib is using GZ_ prefixed export macros
#define _@export_base@_USING_GZ_EXPORT_BASE @_using_gz_export_base@
#if _USING_GZ_EXPORT_BASE


#ifndef @_ign_export_base@_VISIBLE
/// For @lib_name@ developers: Apply this macro to @lib_name@
/// functions and classes which consumers of this library will need to be able
Expand All @@ -97,5 +93,4 @@
#endif


#endif // _@export_base@_USING_GZ_EXPORT_BASE
#endif // @export_base@_EXPORT_HH_
17 changes: 1 addition & 16 deletions cmake/IgnUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1182,18 +1182,10 @@ function(ign_add_component component_name)

#------------------------------------
# Create the target for this component, and configure it to be installed

# Support "gz-"
if(${PROJECT_LIBRARY_TARGET_NAME} MATCHES "^gz-")
set(EXPORT_PREFIX "GZ")
else()
set(EXPORT_PREFIX "IGNITION")
endif()

_ign_add_library_or_component(
LIB_NAME ${component_target_name}
INCLUDE_DIR "${PROJECT_INCLUDE_DIR}/${include_subdir}"
EXPORT_BASE ${EXPORT_PREFIX}_${IGN_DESIGNATION_UPPER}_${component_name_upper}
EXPORT_BASE GZ_${IGN_DESIGNATION_UPPER}_${component_name_upper}
SOURCES ${sources}
${interface_option})

Expand Down Expand Up @@ -1394,7 +1386,6 @@ macro(_ign_add_library_or_component)
# - export_base
# - lib_name
#
# - _using_gz_export_base
# - _ign_export_base

#------------------------------------
Expand Down Expand Up @@ -1499,12 +1490,6 @@ macro(_ign_add_library_or_component)
# TODO(CH3): Remove this on ticktock
# This is to allow IGNITION_ prefixed export macros to generate in Export.hh
# _using_gz_export_base is used in Export.hh.in's configuration!
if(${export_base} MATCHES "^GZ_")
set(_using_gz_export_base 1)
else()
set(_using_gz_export_base 0)
endif()

string(REGEX REPLACE "^GZ_" "IGNITION_" _ign_export_base ${export_base})

configure_file(
Expand Down

0 comments on commit f0a0d22

Please sign in to comment.