diff --git a/CMakeLists.txt b/CMakeLists.txt index 09ba32e36..9be7aca88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ set(IGN_CMAKE_VER ${ignition-cmake3_VERSION_MAJOR}) #============================================================================ # Configure the project #============================================================================ -ign_configure_project( +gz_configure_project( REPLACE_IGNITION_INCLUDE_PATH gz/common VERSION_SUFFIX pre1) @@ -51,18 +51,18 @@ message(STATUS "\n\n-- ====== Finding Dependencies ======") #-------------------------------------- # Find ignition-math -ign_find_package(ignition-math7 REQUIRED_BY geospatial graphics events) +gz_find_package(ignition-math7 REQUIRED_BY geospatial graphics events) set(IGN_MATH_VER ${ignition-math7_VERSION_MAJOR}) #-------------------------------------- # Find ignition-utils -ign_find_package(ignition-utils2 REQUIRED) +gz_find_package(ignition-utils2 REQUIRED) set(IGN_UTILS_VER ${ignition-utils2_VERSION_MAJOR}) #-------------------------------------- # Find Tinyxml2 if(USE_EXTERNAL_TINYXML2) - ign_find_package(TINYXML2 PRETTY tinyxml2 + gz_find_package(TINYXML2 PRETTY tinyxml2 REQUIRED_BY graphics PRIVATE_FOR graphics) else() @@ -71,7 +71,7 @@ endif() #-------------------------------------- # Find libdl -ign_find_package( +gz_find_package( DL REQUIRED PRIVATE PRETTY libdl PURPOSE "Required for plugins") #-------------------------------------- @@ -80,49 +80,49 @@ if(NOT MSVC) #------------------------------------ # Find uuid - ign_find_package(UUID REQUIRED PRETTY uuid) + gz_find_package(UUID REQUIRED PRETTY uuid) endif() #------------------------------------ # Find Freeimage -ign_find_package(FreeImage VERSION 3.9 +gz_find_package(FreeImage VERSION 3.9 REQUIRED_BY graphics PRIVATE_FOR graphics) #------------------------------------ # Find GNU Triangulation Surface Library -ign_find_package( +gz_find_package( GTS PRETTY gts PURPOSE "GNU Triangulation Surface library" REQUIRED_BY graphics PRIVATE_FOR graphics) #------------------------------------ # Find GDAL -ign_find_package(GDAL VERSION 3.0 +gz_find_package(GDAL VERSION 3.0 PKGCONFIG gdal PRIVATE_FOR geospatial REQUIRED_BY geospatial) #------------------------------------ # Find libswscale -ign_find_package(SWSCALE REQUIRED_BY av PRETTY libswscale) +gz_find_package(SWSCALE REQUIRED_BY av PRETTY libswscale) #------------------------------------ # Find avdevice -ign_find_package(AVDEVICE VERSION 56.4.100 REQUIRED_BY av PRETTY libavdevice) +gz_find_package(AVDEVICE VERSION 56.4.100 REQUIRED_BY av PRETTY libavdevice) #------------------------------------ # Find avformat -ign_find_package(AVFORMAT REQUIRED_BY av PRETTY libavformat) +gz_find_package(AVFORMAT REQUIRED_BY av PRETTY libavformat) #------------------------------------ # Find avcodec -ign_find_package(AVCODEC REQUIRED_BY av PRETTY libavcodec) +gz_find_package(AVCODEC REQUIRED_BY av PRETTY libavcodec) #------------------------------------ # Find avutil -ign_find_package(AVUTIL REQUIRED_BY av PRETTY libavutil) +gz_find_package(AVUTIL REQUIRED_BY av PRETTY libavutil) message(STATUS "-------------------------------------------\n") @@ -134,13 +134,13 @@ message(STATUS "-------------------------------------------\n") configure_file("${PROJECT_SOURCE_DIR}/cppcheck.suppress.in" ${PROJECT_BINARY_DIR}/cppcheck.suppress) -ign_configure_build(QUIT_IF_BUILD_ERRORS +gz_configure_build(QUIT_IF_BUILD_ERRORS COMPONENTS av events geospatial graphics profiler testing) #============================================================================ # Create package information #============================================================================ -ign_create_packages() +gz_create_packages() #============================================================================ @@ -149,7 +149,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/av/include/gz/common/CMakeLists.txt b/av/include/gz/common/CMakeLists.txt index cf18581c4..b2ec8b8af 100644 --- a/av/include/gz/common/CMakeLists.txt +++ b/av/include/gz/common/CMakeLists.txt @@ -1,2 +1,2 @@ -ign_install_all_headers(COMPONENT av +gz_install_all_headers(COMPONENT av EXCLUDE_FILES HWEncoder.hh) diff --git a/av/src/CMakeLists.txt b/av/src/CMakeLists.txt index e6d3c5a40..c3d7c6429 100644 --- a/av/src/CMakeLists.txt +++ b/av/src/CMakeLists.txt @@ -9,13 +9,13 @@ if(NOT IGN_COMMON_BUILD_HW_VIDEO) set(GZ_COMMON_BUILD_HW_VIDEO IGN_COMMON_BUILD_HW_VIDEO) endif() -ign_get_libsources_and_unittests(sources gtest_sources) +gz_get_libsources_and_unittests(sources gtest_sources) if(NOT GZ_COMMON_BUILD_HW_VIDEO) list(REMOVE_ITEM sources HWEncoder.cc) endif() -ign_add_component(av SOURCES ${sources} GET_TARGET_NAME av_target) +gz_add_component(av SOURCES ${sources} GET_TARGET_NAME av_target) target_link_libraries(${av_target} PUBLIC @@ -29,7 +29,7 @@ if(GZ_COMMON_BUILD_HW_VIDEO) target_compile_definitions(${av_target} PRIVATE GZ_COMMON_BUILD_HW_VIDEO) endif() -ign_build_tests( +gz_build_tests( TYPE UNIT SOURCES ${gtest_sources} LIB_DEPS diff --git a/events/include/gz/common/CMakeLists.txt b/events/include/gz/common/CMakeLists.txt index e65853afa..74cee7bdc 100644 --- a/events/include/gz/common/CMakeLists.txt +++ b/events/include/gz/common/CMakeLists.txt @@ -1,2 +1 @@ - -ign_install_all_headers(COMPONENT events) +gz_install_all_headers(COMPONENT events) diff --git a/events/src/CMakeLists.txt b/events/src/CMakeLists.txt index 350d010e0..9678e32a1 100644 --- a/events/src/CMakeLists.txt +++ b/events/src/CMakeLists.txt @@ -1,16 +1,15 @@ +gz_get_libsources_and_unittests(sources gtest_sources) -ign_get_libsources_and_unittests(sources gtest_sources) - -ign_add_component(events SOURCES ${sources} GET_TARGET_NAME events_target) +gz_add_component(events SOURCES ${sources} GET_TARGET_NAME events_target) target_link_libraries(${events_target} PUBLIC ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER}) -ign_build_tests( - TYPE UNIT +gz_build_tests( + TYPE UNIT SOURCES ${gtest_sources} - LIB_DEPS - ${events_target} + LIB_DEPS + ${events_target} ignition-common${IGN_COMMON_VER}-testing ) diff --git a/geospatial/include/gz/common/CMakeLists.txt b/geospatial/include/gz/common/CMakeLists.txt index 7155438eb..bb2e8ba69 100644 --- a/geospatial/include/gz/common/CMakeLists.txt +++ b/geospatial/include/gz/common/CMakeLists.txt @@ -1,2 +1 @@ - -ign_install_all_headers(COMPONENT geospatial) +gz_install_all_headers(COMPONENT geospatial) diff --git a/geospatial/src/CMakeLists.txt b/geospatial/src/CMakeLists.txt index d752e6450..8c9ecf088 100644 --- a/geospatial/src/CMakeLists.txt +++ b/geospatial/src/CMakeLists.txt @@ -1,7 +1,6 @@ +gz_get_libsources_and_unittests(sources gtest_sources) -ign_get_libsources_and_unittests(sources gtest_sources) - -ign_add_component(geospatial +gz_add_component(geospatial SOURCES ${sources} DEPENDS_ON_COMPONENTS graphics GET_TARGET_NAME geospatial_target) @@ -18,8 +17,8 @@ target_include_directories(${geospatial_target} PRIVATE ${GDAL_INCLUDE_DIR}) -ign_build_tests(TYPE UNIT SOURCES ${gtest_sources} - LIB_DEPS +gz_build_tests(TYPE UNIT SOURCES ${gtest_sources} + LIB_DEPS ${geospatial_target} ignition-common${IGN_COMMON_VER}-testing ) diff --git a/graphics/include/gz/common/CMakeLists.txt b/graphics/include/gz/common/CMakeLists.txt index e183ec917..5320035f8 100644 --- a/graphics/include/gz/common/CMakeLists.txt +++ b/graphics/include/gz/common/CMakeLists.txt @@ -1,2 +1 @@ - -ign_install_all_headers(COMPONENT graphics) +gz_install_all_headers(COMPONENT graphics) diff --git a/graphics/src/CMakeLists.txt b/graphics/src/CMakeLists.txt index 06b6958ca..735bdd37a 100644 --- a/graphics/src/CMakeLists.txt +++ b/graphics/src/CMakeLists.txt @@ -1,5 +1,4 @@ - -ign_get_libsources_and_unittests(sources gtest_sources) +gz_get_libsources_and_unittests(sources gtest_sources) if(NOT USE_EXTERNAL_TINYXML2) @@ -10,7 +9,7 @@ if(NOT USE_EXTERNAL_TINYXML2) endif() -ign_add_component(graphics SOURCES ${sources} GET_TARGET_NAME graphics_target) +gz_add_component(graphics SOURCES ${sources} GET_TARGET_NAME graphics_target) target_link_libraries(${graphics_target} PUBLIC @@ -20,10 +19,10 @@ target_link_libraries(${graphics_target} GTS::GTS FreeImage::FreeImage) -ign_build_tests( - TYPE UNIT +gz_build_tests( + TYPE UNIT SOURCES ${gtest_sources} - LIB_DEPS + LIB_DEPS ${graphics_target} ignition-common${IGN_COMMON_VER}-testing ) diff --git a/include/gz/common/CMakeLists.txt b/include/gz/common/CMakeLists.txt index c786bcee2..bf4411e89 100644 --- a/include/gz/common/CMakeLists.txt +++ b/include/gz/common/CMakeLists.txt @@ -1,2 +1 @@ - -ign_install_all_headers() +gz_install_all_headers() diff --git a/profiler/src/CMakeLists.txt b/profiler/src/CMakeLists.txt index 3874cb0fb..5dcfb794a 100644 --- a/profiler/src/CMakeLists.txt +++ b/profiler/src/CMakeLists.txt @@ -53,7 +53,7 @@ if(IGN_PROFILER_REMOTERY) list(APPEND PROFILER_TESTS Profiler_Remotery_TEST.cc) endif() -ign_add_component(profiler SOURCES ${PROFILER_SRCS} GET_TARGET_NAME profiler_target) +gz_add_component(profiler SOURCES ${PROFILER_SRCS} GET_TARGET_NAME profiler_target) # Always enable profiler so that it's built, but make it # private so that downstream users can still disable profiling @@ -79,10 +79,10 @@ if(IGN_PROFILER_REMOTERY) endif() endif() -ign_build_tests( - TYPE UNIT +gz_build_tests( + TYPE UNIT SOURCES ${PROFILER_TESTS} - LIB_DEPS + LIB_DEPS ${profiler_target} ignition-common${IGN_COMMON_VER}-testing TEST_LIST profiler_tests) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7573b5d35..23f48efb3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,10 +1,9 @@ - # Collect source files into the "sources" variable and unit test files into the # "gtest_sources" variable -ign_get_libsources_and_unittests(sources gtest_sources) +gz_get_libsources_and_unittests(sources gtest_sources) # Create the library target -ign_create_core_library( +gz_create_core_library( SOURCES ${sources} CXX_STANDARD 17) @@ -45,7 +44,7 @@ if(NOT ignition-math${IGN_MATH_VER}_FOUND) endif() # Build the unit tests -ign_build_tests( +gz_build_tests( TYPE UNIT SOURCES ${gtest_sources} LIB_DEPS diff --git a/test/integration/CMakeLists.txt b/test/integration/CMakeLists.txt index 696247eeb..f65f0a283 100644 --- a/test/integration/CMakeLists.txt +++ b/test/integration/CMakeLists.txt @@ -1,11 +1,11 @@ -ign_get_sources(tests) +gz_get_sources(tests) if (SKIP_av OR INTERNAL_SKIP_av) list(REMOVE_ITEM tests encoder_timing.cc) list(REMOVE_ITEM tests video_encoder.cc) endif() -ign_build_tests( +gz_build_tests( TYPE INTEGRATION SOURCES ${tests} LIB_DEPS ignition-common${IGN_COMMON_VER}-testing diff --git a/test/performance/CMakeLists.txt b/test/performance/CMakeLists.txt index bde3835bb..35de8f031 100644 --- a/test/performance/CMakeLists.txt +++ b/test/performance/CMakeLists.txt @@ -1,4 +1,4 @@ -ign_get_sources(tests) +gz_get_sources(tests) # plugin_specialization test causes lcov to hang # see ign-cmake issue 25 @@ -9,10 +9,10 @@ endif() link_directories(${PROJECT_BINARY_DIR}/test) -ign_build_tests( +gz_build_tests( TYPE PERFORMANCE SOURCES ${tests}) - + if(TARGET PERFORMANCE_plugin_specialization) # We add this dependency to make sure that DummyPlugins gets generated # before PERFORMANCE_plugin_specialization so that its auto-generated header is available. diff --git a/test/regression/CMakeLists.txt b/test/regression/CMakeLists.txt index 51b8bce5e..cdcf8c736 100644 --- a/test/regression/CMakeLists.txt +++ b/test/regression/CMakeLists.txt @@ -1,7 +1,7 @@ -ign_get_sources(tests) +gz_get_sources(tests) link_directories(${PROJECT_BINARY_DIR}/test) -ign_build_tests( +gz_build_tests( TYPE REGRESSION SOURCES ${tests}) diff --git a/testing/include/gz/common/CMakeLists.txt b/testing/include/gz/common/CMakeLists.txt index 027bd91ff..d95f821e0 100644 --- a/testing/include/gz/common/CMakeLists.txt +++ b/testing/include/gz/common/CMakeLists.txt @@ -1 +1 @@ -ign_install_all_headers(COMPONENT testing) +gz_install_all_headers(COMPONENT testing) diff --git a/testing/src/CMakeLists.txt b/testing/src/CMakeLists.txt index 970bd7a81..c1e0ebe6c 100644 --- a/testing/src/CMakeLists.txt +++ b/testing/src/CMakeLists.txt @@ -11,7 +11,7 @@ set(test_sources Utils_TEST.cc ) -ign_add_component(testing SOURCES ${sources} GET_TARGET_NAME testing_target) +gz_add_component(testing SOURCES ${sources} GET_TARGET_NAME testing_target) -ign_build_tests(TYPE UNIT SOURCES ${test_sources} +gz_build_tests(TYPE UNIT SOURCES ${test_sources} LIB_DEPS ${testing_target})