Skip to content

Commit

Permalink
Deprecate public ign functions in favor of gz
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina committed May 17, 2022
1 parent 596d260 commit b48af54
Show file tree
Hide file tree
Showing 29 changed files with 169 additions and 93 deletions.
2 changes: 1 addition & 1 deletion cmake/FindAVCODEC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
########################################
# Find avcodec
include(IgnPkgConfig)
ign_pkg_check_modules_quiet(AVCODEC libavcodec)
gz_pkg_check_modules_quiet(AVCODEC libavcodec)

if(NOT AVCODEC_FOUND)
include(IgnManualSearch)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindAVDEVICE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ set(av_minor ${AVDEVICE_FIND_VERSION_MINOR})
set(av_patch ${AVDEVICE_FIND_VERSION_PATCH})

include(IgnPkgConfig)
ign_pkg_check_modules_quiet(AVDEVICE "libavdevice >= ${av_major}.${av_minor}.${av_patch}")
gz_pkg_check_modules_quiet(AVDEVICE "libavdevice >= ${av_major}.${av_minor}.${av_patch}")

if(NOT AVDEVICE_FOUND)
include(IgnManualSearch)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindAVFORMAT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
########################################
# Find AV format
include(IgnPkgConfig)
ign_pkg_check_modules_quiet(AVFORMAT libavformat)
gz_pkg_check_modules_quiet(AVFORMAT libavformat)

if(NOT AVFORMAT_FOUND)
include(IgnManualSearch)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindAVUTIL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
########################################
# Find avutil
include(IgnPkgConfig)
ign_pkg_check_modules_quiet(AVUTIL libavutil)
gz_pkg_check_modules_quiet(AVUTIL libavutil)

if(NOT AVUTIL_FOUND)
include(IgnManualSearch)
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindDL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ else()
endif()

# We need to manually specify the pkgconfig entry (and type of entry) for dl,
# because ign_pkg_check_modules does not work for it.
# because gz_pkg_check_modules does not work for it.
include(IgnPkgConfig)
ign_pkg_config_library_entry(DL dl)
gz_pkg_config_library_entry(DL dl)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
Expand Down
8 changes: 4 additions & 4 deletions cmake/FindEIGEN3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,21 @@ if(EIGEN3_FOUND)
TARGET_NAME Eigen3::Eigen)

if(EIGEN3_FIND_VERSION)
ign_pkg_config_entry(EIGEN3 "eigen3 >= ${EIGEN3_FIND_VERSION}")
gz_pkg_config_entry(EIGEN3 "eigen3 >= ${EIGEN3_FIND_VERSION}")
else()
ign_pkg_config_entry(EIGEN3 "eigen3")
gz_pkg_config_entry(EIGEN3 "eigen3")
endif()

return()

endif()

if(EIGEN3_FIND_VERSION)
ign_pkg_check_modules_quiet(EIGEN3 "eigen3 >= ${EIGEN3_FIND_VERSION}"
gz_pkg_check_modules_quiet(EIGEN3 "eigen3 >= ${EIGEN3_FIND_VERSION}"
INTERFACE
TARGET_NAME Eigen3::Eigen)
else()
ign_pkg_check_modules_quiet(EIGEN3 "eigen3"
gz_pkg_check_modules_quiet(EIGEN3 "eigen3"
INTERFACE
TARGET_NAME Eigen3::Eigen)
endif()
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindFreeImage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ set(full_version ${major_version}.${minor_version})

if (NOT WIN32)
include(IgnPkgConfig)
ign_pkg_config_library_entry(FreeImage freeimage)
gz_pkg_config_library_entry(FreeImage freeimage)

# If we don't have PkgConfig, or if PkgConfig failed, then do a manual search
if(NOT FreeImage_FOUND)
Expand Down Expand Up @@ -141,7 +141,7 @@ else()

if (FreeImage_FOUND)
include(IgnPkgConfig)
ign_pkg_config_library_entry(FreeImage "FreeImage")
gz_pkg_config_library_entry(FreeImage "FreeImage")
include(IgnImportTarget)
gz_import_target(FreeImage)
endif()
Expand Down
6 changes: 3 additions & 3 deletions cmake/FindGTS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
if (NOT WIN32)
# Configuration using pkg-config modules
include(IgnPkgConfig)
ign_pkg_check_modules(GTS gts)
gz_pkg_check_modules(GTS gts)
else()
# true by default, change to false when a failure appears
set(GTS_FOUND true)
Expand Down Expand Up @@ -91,9 +91,9 @@ else()

if (GTS_FOUND)
# We need to manually specify the pkgconfig entry (and type of entry),
# because ign_pkg_check_modules does not work for it.
# because gz_pkg_check_modules does not work for it.
include(IgnPkgConfig)
ign_pkg_config_library_entry(GTS gts)
gz_pkg_config_library_entry(GTS gts)
include(IgnImportTarget)
gz_import_target(GTS)
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindIgnCURL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ if(${IgnCURL_FOUND})
endif()

include(IgnPkgConfig)
ign_pkg_config_entry(IgnCURL "libcurl >= ${IgnCURL_FIND_VERSION}")
gz_pkg_config_entry(IgnCURL "libcurl >= ${IgnCURL_FIND_VERSION}")

endif()
6 changes: 3 additions & 3 deletions cmake/FindIgnOGRE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ if (NOT WIN32)
set(OGRE_LIBRARY_DIRS "")
set(OGRE_LIBRARIES "")
set(ENV{PKG_CONFIG_PATH} ${pkg_path})
ign_pkg_check_modules_quiet(OGRE "OGRE >= ${full_version}"
gz_pkg_check_modules_quiet(OGRE "OGRE >= ${full_version}"
NO_CMAKE_ENVIRONMENT_PATH
QUIET)
if (OGRE_FOUND)
Expand Down Expand Up @@ -140,7 +140,7 @@ if (NOT WIN32)

# find ogre components
foreach(component ${IgnOGRE_FIND_COMPONENTS})
ign_pkg_check_modules_quiet(IgnOGRE-${component} "OGRE-${component} >= ${full_version}" NO_CMAKE_ENVIRONMENT_PATH)
gz_pkg_check_modules_quiet(IgnOGRE-${component} "OGRE-${component} >= ${full_version}" NO_CMAKE_ENVIRONMENT_PATH)
if(IgnOGRE-${component}_FOUND)
list(APPEND OGRE_LIBRARIES IgnOGRE-${component}::IgnOGRE-${component})
elseif(IgnOGRE_FIND_REQUIRED_${component})
Expand All @@ -158,7 +158,7 @@ if (NOT WIN32)
set(OGRE_PLUGINDIR ${_pkgconfig_invoke_result})
endif()

ign_pkg_config_library_entry(IgnOGRE OgreMain)
gz_pkg_config_library_entry(IgnOGRE OgreMain)

set(OGRE_RESOURCE_PATH ${OGRE_PLUGINDIR})
# Seems that OGRE_PLUGINDIR can end in a newline, which will cause problems
Expand Down
6 changes: 3 additions & 3 deletions cmake/FindIgnOGRE2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ if (NOT WIN32)
# Note: OGRE2 installed from debs is named OGRE-2.2 while the version
# installed from source does not have the 2.2 suffix
# look for OGRE2 installed from debs
ign_pkg_check_modules_quiet(${IGN_OGRE2_PROJECT_NAME} ${OGRE2_INSTALL_PATH} NO_CMAKE_ENVIRONMENT_PATH QUIET)
gz_pkg_check_modules_quiet(${IGN_OGRE2_PROJECT_NAME} ${OGRE2_INSTALL_PATH} NO_CMAKE_ENVIRONMENT_PATH QUIET)

if (${IGN_OGRE2_PROJECT_NAME}_FOUND)
set(IGN_PKG_NAME ${OGRE2_INSTALL_PATH})
Expand Down Expand Up @@ -338,9 +338,9 @@ if (NOT WIN32)
fix_pkgconfig_resource_path_jammy_bug("${OGRE2_RESOURCE_PATH}" OGRE2_RESOURCE_PATH)

# We need to manually specify the pkgconfig entry (and type of entry),
# because ign_pkg_check_modules does not work for it.
# because gz_pkg_check_modules does not work for it.
include(IgnPkgConfig)
ign_pkg_config_library_entry(IgnOGRE2 OgreMain)
gz_pkg_config_library_entry(IgnOGRE2 OgreMain)
else() #WIN32

set(OGRE2_FOUND TRUE)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindIgnProtobuf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# support shared library versions of Protobuf.

include(IgnPkgConfig)
ign_pkg_config_entry(IgnProtobuf "protobuf >= ${IgnProtobuf_FIND_VERSION}")
gz_pkg_config_entry(IgnProtobuf "protobuf >= ${IgnProtobuf_FIND_VERSION}")

find_package(Protobuf ${IgnProtobuf_FIND_VERSION} QUIET CONFIG)

Expand Down
2 changes: 1 addition & 1 deletion cmake/FindIgnURDFDOM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if(PKG_CONFIG_FOUND)
else()
set(signature "urdfdom")
endif()
ign_pkg_check_modules(IgnURDFDOM "${signature}")
gz_pkg_check_modules(IgnURDFDOM "${signature}")
else()
message(VERBOSE "Unable to find pkg-config in the system, fallback to use CMake")
endif()
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindJSONCPP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ else()
include(IgnPkgConfig)

if(JSONCPP_FOUND)
ign_pkg_config_entry(JSONCPP jsoncpp)
gz_pkg_config_entry(JSONCPP jsoncpp)
else()
ign_pkg_check_modules_quiet(JSONCPP jsoncpp)
gz_pkg_check_modules_quiet(JSONCPP jsoncpp)
set(JSONCPP_TARGET JSONCPP::JSONCPP)

# If that failed, then fall back to manual detection.
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindOptiX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -234,5 +234,5 @@ find_package_handle_standard_args(
REQUIRED_VARS OptiX_FOUND)

include(IgnPkgConfig)
ign_pkg_config_library_entry(OptiX OptiX)
gz_pkg_config_library_entry(OptiX OptiX)

4 changes: 2 additions & 2 deletions cmake/FindSQLite3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
# SQLite3_FOUND System has sqlite3 library and headers

if(SQLite3_FIND_VERSION)
ign_pkg_check_modules_quiet(SQLite3 "sqlite3 >= ${SQLite3_FIND_VERSION}")
gz_pkg_check_modules_quiet(SQLite3 "sqlite3 >= ${SQLite3_FIND_VERSION}")
else()
ign_pkg_check_modules_quiet(SQLite3 "sqlite")
gz_pkg_check_modules_quiet(SQLite3 "sqlite")
endif()

if(MSVC)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindSWSCALE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
########################################
# Find libswscale format
include(IgnPkgConfig)
ign_pkg_check_modules_quiet(SWSCALE libswscale)
gz_pkg_check_modules_quiet(SWSCALE libswscale)

if(NOT SWSCALE_FOUND)
include(IgnManualSearch)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindTINYXML2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
include(IgnPkgConfig)

# Use pkg_check_modules to start
ign_pkg_check_modules_quiet(TINYXML2 tinyxml2)
gz_pkg_check_modules_quiet(TINYXML2 tinyxml2)

# If that failed, then fall back to manual detection (necessary for MacOS)
if(NOT TINYXML2_FOUND)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindUUID.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
if (UNIX)
if(NOT APPLE)
include(IgnPkgConfig)
ign_pkg_check_modules_quiet(UUID uuid)
gz_pkg_check_modules_quiet(UUID uuid)

if(NOT UUID_FOUND)
include(IgnManualSearch)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindYAML.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if(YAML_FIND_VERSION AND NOT YAML_FIND_VERSION VERSION_EQUAL "0.1")
"but you requested version ${YAML_FIND_VERSION}.")
else()
include(IgnPkgConfig)
ign_pkg_check_modules_quiet(YAML yaml-0.1)
gz_pkg_check_modules_quiet(YAML yaml-0.1)

# If that failed, then fall back to manual detection.
if(NOT YAML_FOUND)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindZIP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# ZIP_LIBRARIES The ZIP libraries

include(IgnPkgConfig)
ign_pkg_check_modules_quiet(ZIP libzip)
gz_pkg_check_modules_quiet(ZIP libzip)

# If that failed, then fall back to manual detection.
if(NOT ZIP_FOUND)
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindZeroMQ.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ if (ZeroMQ_FOUND)
set(ZeroMQ_TARGET libzmq)

# Make sure to fill out the pkg-config information before quitting
ign_pkg_config_entry(ZeroMQ "libzmq >= ${ZeroMQ_FIND_VERSION}")
gz_pkg_config_entry(ZeroMQ "libzmq >= ${ZeroMQ_FIND_VERSION}")

return()

Expand All @@ -80,6 +80,6 @@ if (UNIX)
message(STATUS "Config-file not installed for ZeroMQ -- checking for pkg-config")
endif()

ign_pkg_check_modules(ZeroMQ "libzmq >= ${ZeroMQ_FIND_VERSION}")
gz_pkg_check_modules(ZeroMQ "libzmq >= ${ZeroMQ_FIND_VERSION}")

endif()
4 changes: 2 additions & 2 deletions cmake/IgnManualSearch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# This macro will find a library based on the name of one of its headers,
# and the library name.
# It is used inside Find***.cmake scripts, typicall as fallback for a
# ign_pkg_check_modules_quiet call.
# gz_pkg_check_modules_quiet call.
# It will create an imported target for the library
#
# INTERFACE: Optional. Use INTERFACE when the target does not actually provide
Expand Down Expand Up @@ -109,7 +109,7 @@ macro(gz_manual_search PACKAGE_NAME)
if(${package}_FOUND)
include(IgnImportTarget)
gz_import_target(${package} ${_gz_pkg_check_modules_interface_option}
TARGET_NAME ${ign_pkg_check_modules_TARGET_NAME})
TARGET_NAME ${gz_pkg_check_modules_TARGET_NAME})
endif()

endmacro()
Loading

0 comments on commit b48af54

Please sign in to comment.