Skip to content

Commit

Permalink
Migrate IgnXXX and example references (#274)
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <[email protected]>
  • Loading branch information
methylDragon committed Jul 12, 2022
1 parent fd9e917 commit 7784120
Show file tree
Hide file tree
Showing 51 changed files with 107 additions and 101 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ list(APPEND CMAKE_MODULE_PATH "${IGNITION_CMAKE_DIR}")

#--------------------------------------
# include the master IgnCMake module
include(IgnCMake)
include(GzCMake)

#--------------------------------------
# Set up the project
Expand Down Expand Up @@ -203,7 +203,7 @@ set(CPPCHECK_INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/examples
)
set(IGNITION_CMAKE_CODECHECK_DIR "${CMAKE_CURRENT_SOURCE_DIR}/codecheck")
include(IgnCodeCheck)
include(GzCodeCheck)
_gz_setup_target_for_codecheck()

# Docs
Expand Down
4 changes: 2 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
1. doxygen allow all .cc, .hh, and CMakeLists.txt, not just in examples/ dir
* [Pull request #198](https://github.com/gazebosim/gz-cmake/pull/198)

1. Add `LEGACY_PROJECT_PREFIX` parameter to `ign_create_core_library`
1. Add `LEGACY_PROJECT_PREFIX` parameter to `gz_create_core_library`
* [Pull request #199](https://github.com/gazebosim/gz-cmake/pull/199)

1. Add `HIDE_SYMBOLS_BY_DEFAULT` parameter to `ign_configure_build`
1. Add `HIDE_SYMBOLS_BY_DEFAULT` parameter to `gz_configure_build`
* [Pull request #196](https://github.com/gazebosim/gz-cmake/pull/196)

1. Add Ubuntu Jammy CI
Expand Down
2 changes: 1 addition & 1 deletion MigrationFromClassic.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ writing a good quality find-module.

In many cases, a package that we depend on will be distributed with a pkgconfig
(`*.pc`) file. In such a case, `gz-cmake` provides a macro that can easily
find the package and create an imported target for it. Simply use `include(IgnPkgConfig)`
find the package and create an imported target for it. Simply use `include(GzPkgConfig)`
and then `gz_pkg_check_modules(~)` in your find-module, and you are done. An
example of a simple case of this can be found in `gz-cmake/cmake/FindGTS.cmake`.

Expand Down
4 changes: 2 additions & 2 deletions cmake/FindAVCODEC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
#
########################################
# Find avcodec
include(IgnPkgConfig)
include(GzPkgConfig)
gz_pkg_check_modules_quiet(AVCODEC libavcodec)

if(NOT AVCODEC_FOUND)
include(IgnManualSearch)
include(GzManualSearch)
gz_manual_search(AVCODEC
HEADER_NAMES "libavcodec/avcodec.h"
LIBRARY_NAMES "avcodec")
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindAVDEVICE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ set(av_major ${AVDEVICE_FIND_VERSION_MAJOR})
set(av_minor ${AVDEVICE_FIND_VERSION_MINOR})
set(av_patch ${AVDEVICE_FIND_VERSION_PATCH})

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

if(NOT AVDEVICE_FOUND)
include(IgnManualSearch)
include(GzManualSearch)
gz_manual_search(AVDEVICE
HEADER_NAMES "libavdevice/avdevice.h"
LIBRARY_NAMES "avdevice")
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindAVFORMAT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
#
########################################
# Find AV format
include(IgnPkgConfig)
include(GzPkgConfig)
gz_pkg_check_modules_quiet(AVFORMAT libavformat)

if(NOT AVFORMAT_FOUND)
include(IgnManualSearch)
include(GzManualSearch)
gz_manual_search(AVFORMAT
HEADER_NAMES "libavformat/avformat.h"
LIBRARY_NAMES "avformat")
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindAVUTIL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
#
########################################
# Find avutil
include(IgnPkgConfig)
include(GzPkgConfig)
gz_pkg_check_modules_quiet(AVUTIL libavutil)

if(NOT AVUTIL_FOUND)
include(IgnManualSearch)
include(GzManualSearch)
gz_manual_search(AVUTIL
HEADER_NAMES "libavutil/avutil.h"
LIBRARY_NAMES "avutil")
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindCPPZMQ.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ endif()

if(CPPZMQ_FOUND)

include(IgnImportTarget)
include(GzImportTarget)

# Since this is a header-only library, we should import it as an INTERFACE
# target.
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindDL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ else()
mark_as_advanced(DL_LIBRARIES)

if(DL_FOUND)
include(IgnImportTarget)
include(GzImportTarget)
gz_import_target(DL)
set(DL_TARGET DL::DL)
endif()
Expand All @@ -94,7 +94,7 @@ endif()

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

include(FindPackageHandleStandardArgs)
Expand Down
8 changes: 4 additions & 4 deletions cmake/FindFreeImage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set(minor_version ${FreeImage_FIND_VERSION_MINOR})
set(full_version ${major_version}.${minor_version})

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

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

if(FreeImage_FOUND)
# Create the imported target for FreeImage if we found it
include(IgnImportTarget)
include(GzImportTarget)
gz_import_target(FreeImage)
endif()

Expand Down Expand Up @@ -140,9 +140,9 @@ else()
endif()

if (FreeImage_FOUND)
include(IgnPkgConfig)
include(GzPkgConfig)
gz_pkg_config_library_entry(FreeImage "FreeImage")
include(IgnImportTarget)
include(GzImportTarget)
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 @@ -18,7 +18,7 @@

if (NOT WIN32)
# Configuration using pkg-config modules
include(IgnPkgConfig)
include(GzPkgConfig)
gz_pkg_check_modules(GTS gts)
else()
# true by default, change to false when a failure appears
Expand Down Expand Up @@ -92,9 +92,9 @@ else()
if (GTS_FOUND)
# We need to manually specify the pkgconfig entry (and type of entry),
# because gz_pkg_check_modules does not work for it.
include(IgnPkgConfig)
include(GzPkgConfig)
gz_pkg_config_library_entry(GTS gts)
include(IgnImportTarget)
include(GzImportTarget)
gz_import_target(GTS)
endif()
endif()
4 changes: 2 additions & 2 deletions cmake/FindGzCURL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ if(${GzCURL_FOUND})
INTERFACE_LINK_LIBRARIES CURL::libcurl)
endif()

include(IgnImportTarget)
include(GzImportTarget)

if(NOT TARGET curl::curl)
gz_import_target(curl
LIB_VAR CURL_LIBRARIES
INCLUDE_VAR CURL_INCLUDE_DIRS)
endif()

include(IgnPkgConfig)
include(GzPkgConfig)
gz_pkg_config_entry(GzCURL "libcurl >= ${GzCURL_FIND_VERSION}")

endif()
2 changes: 1 addition & 1 deletion cmake/FindGzOGRE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ if(OGRE_FOUND)
list(APPEND OGRE_INCLUDE_DIRS ${dir_include})
endforeach()

include(IgnImportTarget)
include(GzImportTarget)
gz_import_target(GzOGRE
TARGET_NAME GzOGRE::GzOGRE
LIB_VAR OGRE_LIBRARIES
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindGzOGRE2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ if (NOT WIN32)
set(OGRE2_VERSION "${OGRE2_VERSION_MAJOR}.${OGRE2_VERSION_MINOR}.${OGRE2_VERSION_PATCH}")

# find ogre components
include(IgnImportTarget)
include(GzImportTarget)
foreach(component ${GzOGRE2_FIND_COMPONENTS})
find_library(OGRE2-${component}
NAMES
Expand Down Expand Up @@ -339,7 +339,7 @@ if (NOT WIN32)

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

Expand Down
4 changes: 2 additions & 2 deletions cmake/FindGzProtobuf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# correctly imported. This is especially important on Windows in order to
# support shared library versions of Protobuf.

include(IgnPkgConfig)
include(GzPkgConfig)
gz_pkg_config_entry(GzProtobuf "protobuf >= ${GzProtobuf_FIND_VERSION}")

find_package(Protobuf ${GzProtobuf_FIND_VERSION} QUIET CONFIG)
Expand Down Expand Up @@ -82,7 +82,7 @@ if(${Protobuf_FOUND})

# Older versions of protobuf don't create imported targets, so we will create
# them here if they have not been provided.
include(IgnImportTarget)
include(GzImportTarget)

if(NOT TARGET protobuf::libprotobuf)
gz_import_target(protobuf
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindGzURDFDOM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# Prefer pkg-config over cmake if possible since version checking is not working
# on urdfdom series from 1.x to 3.0.0 (at least)
include(IgnPkgConfig)
include(GzPkgConfig)
if(PKG_CONFIG_FOUND)
if (GzURDFDOM_FIND_VERSION)
set(signature "urdfdom >= ${GzURDFDOM_FIND_VERSION}")
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindIFADDRS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ endif()

if(IFADDRS_FOUND)

include(IgnImportTarget)
include(GzImportTarget)

# Since this is a header-only library, we should import it as an INTERFACE
# target.
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindJSONCPP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if(JSONCPP_FIND_VERSION)
else()
find_package(jsoncpp CONFIG QUIET)
set(JSONCPP_TARGET jsoncpp_lib)
include(IgnPkgConfig)
include(GzPkgConfig)

if(JSONCPP_FOUND)
gz_pkg_config_entry(JSONCPP jsoncpp)
Expand Down Expand Up @@ -67,7 +67,7 @@ else()
endif()

if(JSONCPP_FOUND)
include(IgnImportTarget)
include(GzImportTarget)
gz_import_target(JSONCPP)
endif()
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindODE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if(ODE_FOUND)
message(STATUS "Looking for Open Dynamics Engine - found")
endif()

include(IgnImportTarget)
include(GzImportTarget)
gz_import_target(ODE)

if(NOT ODE_FIND_QUIETLY)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindOptiX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,6 @@ find_package_handle_standard_args(
OptiX
REQUIRED_VARS OptiX_FOUND)
include(IgnPkgConfig)
include(GzPkgConfig)
gz_pkg_config_library_entry(OptiX OptiX)
4 changes: 2 additions & 2 deletions cmake/FindSWSCALE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
#
########################################
# Find libswscale format
include(IgnPkgConfig)
include(GzPkgConfig)
gz_pkg_check_modules_quiet(SWSCALE libswscale)

if(NOT SWSCALE_FOUND)
include(IgnManualSearch)
include(GzManualSearch)
gz_manual_search(SWSCALE
HEADER_NAMES "libswscale/swscale.h"
LIBRARY_NAMES "swscale")
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindTINYXML2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
########################################
# Find tinyxml2. Only debian distributions package tinyxml with a pkg-config.

include(IgnPkgConfig)
include(GzPkgConfig)

# Use pkg_check_modules to start
gz_pkg_check_modules_quiet(TINYXML2 tinyxml2)
Expand Down Expand Up @@ -53,7 +53,7 @@ if(NOT TINYXML2_FOUND)
endif()

if(TINYXML2_FOUND)
include(IgnImportTarget)
include(GzImportTarget)
gz_import_target(TINYXML2)
endif()

Expand Down
4 changes: 2 additions & 2 deletions cmake/FindUUID.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
# Find uuid
if (UNIX)
if(NOT APPLE)
include(IgnPkgConfig)
include(GzPkgConfig)
gz_pkg_check_modules_quiet(UUID uuid)

if(NOT UUID_FOUND)
include(IgnManualSearch)
include(GzManualSearch)
gz_manual_search(UUID
HEADER_NAMES "uuid.h"
LIBRARY_NAMES "uuid libuuid"
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindYAML.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if(YAML_FIND_VERSION AND NOT YAML_FIND_VERSION VERSION_EQUAL "0.1")
message(WARNING "FindYAML only knows how to find version 0.1 "
"but you requested version ${YAML_FIND_VERSION}.")
else()
include(IgnPkgConfig)
include(GzPkgConfig)
gz_pkg_check_modules_quiet(YAML yaml-0.1)

# If that failed, then fall back to manual detection.
Expand Down Expand Up @@ -80,7 +80,7 @@ else()
endif()

if(YAML_FOUND)
include(IgnImportTarget)
include(GzImportTarget)
gz_import_target(YAML)
message(STATUS "Assuming libyaml is static, defining YAML_DECLARE_STATIC")
set_target_properties(YAML::YAML PROPERTIES
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindZIP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# ZIP_INCLUDE_DIRS The location of ZIP headers
# ZIP_LIBRARIES The ZIP libraries

include(IgnPkgConfig)
include(GzPkgConfig)
gz_pkg_check_modules_quiet(ZIP libzip)

# If that failed, then fall back to manual detection.
Expand Down Expand Up @@ -55,7 +55,7 @@ if(NOT ZIP_FOUND)
endif()

if(ZIP_FOUND)
include(IgnImportTarget)
include(GzImportTarget)
gz_import_target(ZIP)
endif()
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindZeroMQ.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
# ZeroMQ_LIBRARIES The ZeroMQ libraries
# ZeroMQ_INCLUDE_DIRS The location of ZeroMQ headers

include(IgnPkgConfig)
include(GzPkgConfig)

# We initialize this variable to the default target name
set(ZeroMQ_TARGET ZeroMQ::ZeroMQ)
Expand Down
4 changes: 2 additions & 2 deletions cmake/GzBenchmark.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#.rst
# IgnBenchmark
# GzBenchmark
# ------------
#
# _gz_add_version_info_target()
Expand All @@ -13,7 +13,7 @@
#
# USAGE:
# 1. Add the following line to your CMakeLists.txt
# include(IgnBenchmark)
# include(GzBenchmark)
#
# 2. Add the benchmark
# gz_add_benchmarks(SOURCES ${benchmark_sources_list})
Expand Down
Loading

0 comments on commit 7784120

Please sign in to comment.