diff --git a/CMakeLists.txt b/CMakeLists.txt index f85e5aa36..8fc68a546 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ find_package(ignition-cmake3 REQUIRED) #============================================================================ # Configure the project #============================================================================ -ign_configure_project( +gz_configure_project( REPLACE_IGNITION_INCLUDE_PATH gz/physics VERSION_SUFFIX pre1) @@ -36,38 +36,38 @@ message(STATUS "\n\n-- ====== Finding Dependencies ======") #-------------------------------------- # Find ignition-common -ign_find_package(ignition-common5 +gz_find_package(ignition-common5 COMPONENTS geospatial graphics profiler REQUIRED_BY heightmap mesh dartsim tpe tpelib bullet) set(IGN_COMMON_VER ${ignition-common5_VERSION_MAJOR}) #-------------------------------------- # Find ignition-math -ign_find_package(ignition-math7 REQUIRED COMPONENTS eigen3) +gz_find_package(ignition-math7 REQUIRED COMPONENTS eigen3) set(IGN_MATH_VER ${ignition-math7_VERSION_MAJOR}) #-------------------------------------- # Find ignition-plugin -ign_find_package(ignition-plugin2 REQUIRED COMPONENTS all) +gz_find_package(ignition-plugin2 REQUIRED COMPONENTS all) set(IGN_PLUGIN_VER ${ignition-plugin2_VERSION_MAJOR}) #-------------------------------------- # Find ignition-utils -ign_find_package(ignition-utils2 REQUIRED COMPONENTS cli) +gz_find_package(ignition-utils2 REQUIRED COMPONENTS cli) set(IGN_UTILS_VER ${ignition-utils2_VERSION_MAJOR}) #-------------------------------------- # Find Eigen -ign_find_package(EIGEN3 REQUIRED) +gz_find_package(EIGEN3 REQUIRED) #-------------------------------------- # Find SDFormat for the SDF features -ign_find_package(sdformat13 +gz_find_package(sdformat13 REQUIRED_BY sdf dartsim tpe bullet) #-------------------------------------- # Find dartsim for the dartsim plugin wrapper -ign_find_package(DART +gz_find_package(DART COMPONENTS collision-bullet collision-ode @@ -81,7 +81,7 @@ ign_find_package(DART #-------------------------------------- # Find bullet for the bullet plugin wrapper -ign_find_package(IgnBullet +gz_find_package(IgnBullet VERSION 2.87 REQUIRED_BY bullet PKGCONFIG bullet @@ -99,14 +99,14 @@ set(GZ_PHYSICS_ENGINE_INSTALL_DIR #============================================================================ # Configure the build #============================================================================ -ign_configure_build(QUIT_IF_BUILD_ERRORS +gz_configure_build(QUIT_IF_BUILD_ERRORS COMPONENTS sdf heightmap mesh dartsim tpe bullet) #============================================================================ # Create package information #============================================================================ -ign_create_packages() +gz_create_packages() #============================================================================ @@ -115,7 +115,7 @@ ign_create_packages() configure_file(${CMAKE_SOURCE_DIR}/api.md.in ${CMAKE_BINARY_DIR}/api.md) configure_file(${CMAKE_SOURCE_DIR}/tutorials.md.in ${CMAKE_BINARY_DIR}/tutorials.md) -ign_create_docs( +gz_create_docs( API_MAINPAGE_MD "${CMAKE_BINARY_DIR}/api.md" TUTORIALS_MAINPAGE_MD "${CMAKE_BINARY_DIR}/tutorials.md" TAGFILES diff --git a/bullet/CMakeLists.txt b/bullet/CMakeLists.txt index 68ad12155..9c6a34513 100644 --- a/bullet/CMakeLists.txt +++ b/bullet/CMakeLists.txt @@ -1,17 +1,17 @@ # This component expresses custom features of the bullet plugin, which can # expose native bullet data types. -ign_add_component(bullet INTERFACE +gz_add_component(bullet INTERFACE DEPENDS_ON_COMPONENTS sdf mesh GET_TARGET_NAME features) link_directories(${BULLET_LIBRARY_DIRS}) target_link_libraries(${features} INTERFACE IgnBullet::IgnBullet) -ign_get_libsources_and_unittests(sources test_sources) +gz_get_libsources_and_unittests(sources test_sources) -# TODO(MXG): Think about an ign_add_plugin(~) macro for ign-cmake +# TODO(MXG): Think about an gz_add_plugin(~) macro for ign-cmake set(engine_name bullet-plugin) -ign_add_component(${engine_name} +gz_add_component(${engine_name} SOURCES ${sources} DEPENDS_ON_COMPONENTS bullet GET_TARGET_NAME bullet_plugin) @@ -32,7 +32,7 @@ install( DIRECTORY include/ DESTINATION "${IGN_INCLUDE_INSTALL_DIR_FULL}") -# The library created by `ign_add_component` includes the ign-physics version +# The library created by `gz_add_component` includes the ign-physics version # (i.e. libignition-physics1-name-plugin.so), but for portability, # we also install an unversioned symlink into the same versioned folder. set(versioned ${CMAKE_SHARED_LIBRARY_PREFIX}${bullet_plugin}${CMAKE_SHARED_LIBRARY_SUFFIX}) @@ -51,7 +51,7 @@ EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${versioned} ${unvers INSTALL(FILES ${PROJECT_BINARY_DIR}/${unversioned} DESTINATION ${GZ_PHYSICS_ENGINE_INSTALL_DIR}) # Testing -ign_build_tests( +gz_build_tests( TYPE UNIT_bullet SOURCES ${test_sources} LIB_DEPS diff --git a/dartsim/CMakeLists.txt b/dartsim/CMakeLists.txt index 7c3ce5738..185a719b5 100644 --- a/dartsim/CMakeLists.txt +++ b/dartsim/CMakeLists.txt @@ -1,6 +1,6 @@ # This component expresses custom features of the dartsim plugin, which can # expose native dartsim data types. -ign_add_component(dartsim INTERFACE +gz_add_component(dartsim INTERFACE DEPENDS_ON_COMPONENTS sdf heightmap mesh GET_TARGET_NAME features) @@ -15,11 +15,11 @@ install( DIRECTORY include/ DESTINATION "${IGN_INCLUDE_INSTALL_DIR_FULL}") -ign_get_libsources_and_unittests(sources test_sources) +gz_get_libsources_and_unittests(sources test_sources) -# TODO(MXG): Think about an ign_add_plugin(~) macro for ign-cmake +# TODO(MXG): Think about an gz_add_plugin(~) macro for ign-cmake set(engine_name dartsim-plugin) -ign_add_component(${engine_name} +gz_add_component(${engine_name} SOURCES ${sources} DEPENDS_ON_COMPONENTS dartsim GET_TARGET_NAME dartsim_plugin) @@ -38,9 +38,9 @@ target_link_libraries(${dartsim_plugin} ignition-common${IGN_COMMON_VER}::profiler ) -# The ignition fork of DART contains additional code that allows customizing -# contact constraints. We check for the presence of "ContactSurface.hpp", which -# was added to enable these customizations, to detect if the feature is +# The ignition fork of DART contains additional code that allows customizing +# contact constraints. We check for the presence of "ContactSurface.hpp", which +# was added to enable these customizations, to detect if the feature is # available. include(CheckIncludeFileCXX) if (MSVC) @@ -61,7 +61,7 @@ endif() # Note that plugins are currently being installed in 2 places: /lib and the engine-plugins dir install(TARGETS ${dartsim_plugin} DESTINATION ${GZ_PHYSICS_ENGINE_INSTALL_DIR}) -# The library created by `ign_add_component` includes the ign-physics version +# The library created by `gz_add_component` includes the ign-physics version # (i.e. libignition-physics1-name-plugin.so), but for portability, # we also install an unversioned symlink into the same versioned folder. set(versioned ${CMAKE_SHARED_LIBRARY_PREFIX}${dartsim_plugin}${CMAKE_SHARED_LIBRARY_SUFFIX}) @@ -78,7 +78,7 @@ else() endif() # Testing -ign_build_tests( +gz_build_tests( TYPE UNIT SOURCES ${test_sources} LIB_DEPS diff --git a/heightmap/CMakeLists.txt b/heightmap/CMakeLists.txt index 0d31f22ae..65913ff43 100644 --- a/heightmap/CMakeLists.txt +++ b/heightmap/CMakeLists.txt @@ -1,4 +1,4 @@ -ign_add_component(heightmap INTERFACE +gz_add_component(heightmap INTERFACE GET_TARGET_NAME heightmap) target_link_libraries(${heightmap} diff --git a/include/gz/physics/CMakeLists.txt b/include/gz/physics/CMakeLists.txt index c786bcee2..bf4411e89 100644 --- a/include/gz/physics/CMakeLists.txt +++ b/include/gz/physics/CMakeLists.txt @@ -1,2 +1 @@ - -ign_install_all_headers() +gz_install_all_headers() diff --git a/mesh/CMakeLists.txt b/mesh/CMakeLists.txt index 98c01d2b1..4fe750e9f 100644 --- a/mesh/CMakeLists.txt +++ b/mesh/CMakeLists.txt @@ -1,5 +1,4 @@ - -ign_add_component(mesh INTERFACE +gz_add_component(mesh INTERFACE GET_TARGET_NAME mesh) target_link_libraries(${mesh} diff --git a/sdf/CMakeLists.txt b/sdf/CMakeLists.txt index 449bcb6cb..b2d661306 100644 --- a/sdf/CMakeLists.txt +++ b/sdf/CMakeLists.txt @@ -1,5 +1,4 @@ - -ign_add_component(sdf INTERFACE +gz_add_component(sdf INTERFACE GET_TARGET_NAME sdf) target_link_libraries(${sdf} INTERFACE ${SDFormat_LIBRARIES}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a22dd97ff..3eb30401d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,6 @@ -ign_get_libsources_and_unittests(sources gtest_sources) +gz_get_libsources_and_unittests(sources gtest_sources) -ign_create_core_library(SOURCES ${sources} CXX_STANDARD 17) +gz_create_core_library(SOURCES ${sources} CXX_STANDARD 17) target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} PUBLIC @@ -9,7 +9,7 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} ignition-plugin${IGN_PLUGIN_VER}::register Eigen3::Eigen) -ign_build_tests( +gz_build_tests( TYPE UNIT SOURCES ${gtest_sources}) diff --git a/test/benchmark/CMakeLists.txt b/test/benchmark/CMakeLists.txt index 0fda6ea7d..909835d4d 100644 --- a/test/benchmark/CMakeLists.txt +++ b/test/benchmark/CMakeLists.txt @@ -4,4 +4,4 @@ set(tests ExpectData.cc ) -ign_add_benchmarks(SOURCES ${tests}) +gz_add_benchmarks(SOURCES ${tests}) diff --git a/test/integration/CMakeLists.txt b/test/integration/CMakeLists.txt index a734f294c..643c54bd3 100644 --- a/test/integration/CMakeLists.txt +++ b/test/integration/CMakeLists.txt @@ -1,5 +1,4 @@ - -ign_get_sources(tests) +gz_get_sources(tests) if (NOT DART_FOUND) list(REMOVE_ITEM tests DoublePendulum.cc) @@ -7,7 +6,7 @@ endif() configure_file (test_config.h.in ${PROJECT_BINARY_DIR}/test_config.h) -ign_build_tests( +gz_build_tests( TYPE INTEGRATION SOURCES ${tests} LIB_DEPS diff --git a/test/performance/CMakeLists.txt b/test/performance/CMakeLists.txt index 296633de9..f12609012 100644 --- a/test/performance/CMakeLists.txt +++ b/test/performance/CMakeLists.txt @@ -1,5 +1,4 @@ - -ign_get_sources(tests) +gz_get_sources(tests) # ExpectData test causes lcov to hang # see ign-cmake issue 25 @@ -8,6 +7,6 @@ if("${CMAKE_BUILD_TYPE_UPPERCASE}" STREQUAL "COVERAGE") ExpectData.cc) endif() -ign_build_tests( +gz_build_tests( TYPE PERFORMANCE SOURCES ${tests}) diff --git a/test/regression/CMakeLists.txt b/test/regression/CMakeLists.txt index 36fe94ceb..f56c54cd5 100644 --- a/test/regression/CMakeLists.txt +++ b/test/regression/CMakeLists.txt @@ -1,6 +1,5 @@ +gz_get_sources(tests) -ign_get_sources(tests) - -ign_build_tests( +gz_build_tests( TYPE REGRESSION SOURCES ${tests}) diff --git a/test/static_assert/CMakeLists.txt b/test/static_assert/CMakeLists.txt index 3915378ab..6f2004c76 100644 --- a/test/static_assert/CMakeLists.txt +++ b/test/static_assert/CMakeLists.txt @@ -1,5 +1,4 @@ - -ign_get_sources(assert_tests) +gz_get_sources(assert_tests) if(UNIX) diff --git a/tpe/lib/CMakeLists.txt b/tpe/lib/CMakeLists.txt index fe85d324a..d08c55cd7 100644 --- a/tpe/lib/CMakeLists.txt +++ b/tpe/lib/CMakeLists.txt @@ -1,11 +1,11 @@ -ign_get_libsources_and_unittests(sources test_sources) +gz_get_libsources_and_unittests(sources test_sources) set (aabb_tree_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/aabb_tree/AABB.h ${CMAKE_CURRENT_SOURCE_DIR}/src/aabb_tree/AABB.cc) set(sources ${sources} ${aabb_tree_SRC}) -ign_add_component(tpelib +gz_add_component(tpelib SOURCES ${sources} GET_TARGET_NAME tpelib_target CXX_STANDARD 17) @@ -17,7 +17,7 @@ target_link_libraries(${tpelib_target} ignition-math${IGN_MATH_VER}::eigen3 ) - ign_build_tests( +gz_build_tests( TYPE UNIT_tpelib SOURCES ${test_sources} LIB_DEPS diff --git a/tpe/plugin/CMakeLists.txt b/tpe/plugin/CMakeLists.txt index 6ff86cb93..918a26873 100644 --- a/tpe/plugin/CMakeLists.txt +++ b/tpe/plugin/CMakeLists.txt @@ -1,17 +1,17 @@ # This component expresses custom features of the tpe plugin, which can # expose native tpe data types. -ign_add_component(tpe INTERFACE +gz_add_component(tpe INTERFACE DEPENDS_ON_COMPONENTS sdf mesh GET_TARGET_NAME features) target_link_libraries(${features} INTERFACE ${PROJECT_LIBRARY_TARGET_NAME}-tpelib) target_include_directories(${features} SYSTEM INTERFACE) -ign_get_libsources_and_unittests(sources test_sources) +gz_get_libsources_and_unittests(sources test_sources) -# TODO(MXG): Think about an ign_add_plugin(~) macro for ign-cmake +# TODO(MXG): Think about an gz_add_plugin(~) macro for ign-cmake set(engine_name tpe-plugin) -ign_add_component(${engine_name} +gz_add_component(${engine_name} SOURCES ${sources} DEPENDS_ON_COMPONENTS tpe GET_TARGET_NAME tpe_plugin) @@ -34,7 +34,7 @@ target_link_libraries(${tpe_plugin} # Note that plugins are currently being installed in 2 places: /lib and the engine-plugins dir install(TARGETS ${tpe_plugin} DESTINATION ${GZ_PHYSICS_ENGINE_INSTALL_DIR}) -# The library created by `ign_add_component` includes the ign-physics version +# The library created by `gz_add_component` includes the ign-physics version # (i.e. libignition-physics1-name-plugin.so), but for portability, # we also install an unversioned symlink into the same versioned folder. set(versioned ${CMAKE_SHARED_LIBRARY_PREFIX}${tpe_plugin}${CMAKE_SHARED_LIBRARY_SUFFIX}) @@ -50,7 +50,7 @@ else() INSTALL(FILES ${PROJECT_BINARY_DIR}/${unversioned} DESTINATION ${GZ_PHYSICS_ENGINE_INSTALL_DIR}) endif() -ign_build_tests( +gz_build_tests( TYPE UNIT_tpe SOURCES ${test_sources} LIB_DEPS