Skip to content

Commit

Permalink
Rename CMake project to gz
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <louise@openrobotics.org>
  • Loading branch information
chapulina committed May 9, 2022
1 parent b87a28e commit 65b2e51
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 48 deletions.
22 changes: 11 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
#============================================================================
# Initialize the project
#============================================================================
project(ignition-common5 VERSION 5.0.0)
set(IGN_COMMON_VER ${PROJECT_VERSION_MAJOR})
project(gz-common5 VERSION 5.0.0)
set(GZ_COMMON_VER ${PROJECT_VERSION_MAJOR})

#============================================================================
# Find ignition-cmake
# Find gz-cmake
#============================================================================
find_package(ignition-cmake3 REQUIRED)
set(IGN_CMAKE_VER ${ignition-cmake3_VERSION_MAJOR})
find_package(gz-cmake3 REQUIRED)
set(GZ_CMAKE_VER ${gz-cmake3_VERSION_MAJOR})

#============================================================================
# Configure the project
Expand Down Expand Up @@ -50,14 +50,14 @@ endif()
message(STATUS "\n\n-- ====== Finding Dependencies ======")

#--------------------------------------
# Find ignition-math
ign_find_package(ignition-math7 REQUIRED_BY geospatial graphics events)
set(IGN_MATH_VER ${ignition-math7_VERSION_MAJOR})
# Find gz-math
ign_find_package(gz-math7 REQUIRED_BY geospatial graphics events)
set(GZ_MATH_VER ${gz-math7_VERSION_MAJOR})

#--------------------------------------
# Find ignition-utils
ign_find_package(ignition-utils2 REQUIRED)
set(IGN_UTILS_VER ${ignition-utils2_VERSION_MAJOR})
# Find gz-utils
ign_find_package(gz-utils2 REQUIRED)
set(GZ_UTILS_VER ${gz-utils2_VERSION_MAJOR})

#--------------------------------------
# Find Tinyxml2
Expand Down
4 changes: 2 additions & 2 deletions av/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ if(IGN_COMMON_BUILD_HW_VIDEO)
endif()

ign_build_tests(
TYPE UNIT
TYPE UNIT
SOURCES ${gtest_sources}
LIB_DEPS
${av_target}
ignition-common${IGN_COMMON_VER}-testing
gz-common${GZ_COMMON_VER}-testing
)

10 changes: 5 additions & 5 deletions events/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ ign_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})
gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

ign_build_tests(
TYPE UNIT
TYPE UNIT
SOURCES ${gtest_sources}
LIB_DEPS
${events_target}
ignition-common${IGN_COMMON_VER}-testing
LIB_DEPS
${events_target}
gz-common${GZ_COMMON_VER}-testing
)
16 changes: 8 additions & 8 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

# Find the ignition-common library
find_package(ignition-common5 QUIET REQUIRED COMPONENTS events profiler)
set(IGN_COMMON_VER ${ignition-common5_VERSION_MAJOR})
# Find the gz-common library
find_package(gz-common5 QUIET REQUIRED COMPONENTS events profiler)
set(GZ_COMMON_VER ${gz-common5_VERSION_MAJOR})

add_executable(assert_example assert_example.cc)
target_link_libraries(assert_example ignition-common${IGN_COMMON_VER}::core)
target_link_libraries(assert_example gz-common${GZ_COMMON_VER}::core)

add_executable(console_example console.cc)
target_link_libraries(console_example ignition-common${IGN_COMMON_VER}::core)
target_link_libraries(console_example gz-common${GZ_COMMON_VER}::core)

add_executable(events_example events.cc)
target_link_libraries(events_example ignition-common${IGN_COMMON_VER}::events)
target_link_libraries(events_example gz-common${GZ_COMMON_VER}::events)

add_executable(profiler_example profiler.cc)
target_link_libraries(profiler_example ignition-common${IGN_COMMON_VER}::profiler)
target_link_libraries(profiler_example gz-common${GZ_COMMON_VER}::profiler)
target_compile_definitions(profiler_example PUBLIC "IGN_PROFILER_ENABLE=1")

add_executable(logging_performance logging_performance.cc)
target_link_libraries(logging_performance ignition-common${IGN_COMMON_VER}::core)
target_link_libraries(logging_performance gz-common${GZ_COMMON_VER}::core)

8 changes: 4 additions & 4 deletions geospatial/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ ign_add_component(geospatial
target_link_libraries(${geospatial_target}
PUBLIC
${PROJECT_LIBRARY_TARGET_NAME}-graphics
ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER}
ignition-utils${IGN_UTILS_VER}::ignition-utils${IGN_UTILS_VER}
gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER}
gz-utils${GZ_UTILS_VER}::gz-utils${GZ_UTILS_VER}
PRIVATE
${GDAL_LIBRARY})

Expand All @@ -19,7 +19,7 @@ target_include_directories(${geospatial_target}
${GDAL_INCLUDE_DIR})

ign_build_tests(TYPE UNIT SOURCES ${gtest_sources}
LIB_DEPS
LIB_DEPS
${geospatial_target}
ignition-common${IGN_COMMON_VER}-testing
gz-common${GZ_COMMON_VER}-testing
)
14 changes: 7 additions & 7 deletions graphics/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ ign_add_component(graphics SOURCES ${sources} GET_TARGET_NAME graphics_target)

target_link_libraries(${graphics_target}
PUBLIC
ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER}
ignition-utils${IGN_UTILS_VER}::ignition-utils${IGN_UTILS_VER}
gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER}
gz-utils${GZ_UTILS_VER}::gz-utils${GZ_UTILS_VER}
PRIVATE
GTS::GTS
FreeImage::FreeImage)

ign_build_tests(
TYPE UNIT
TYPE UNIT
SOURCES ${gtest_sources}
LIB_DEPS
LIB_DEPS
${graphics_target}
ignition-common${IGN_COMMON_VER}-testing
gz-common${GZ_COMMON_VER}-testing
)

if(USE_EXTERNAL_TINYXML2)
Expand All @@ -46,7 +46,7 @@ else()

# Otherwise, add its source directory to our target's PRIVATE include
# directories. We do not want this to be visible to consumers of
# ignition-common.
# gz-common.
target_include_directories(${graphics_target}
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tinyxml2)

Expand All @@ -57,7 +57,7 @@ else()
target_include_directories(UNIT_ColladaExporter_TEST PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tinyxml2)
# We also need to add this as a source file to the collada exporter test's
# target, because we do not export the tinyxml2 symbols that get generated
# in the ignition-common library. Therefore, the collada exporter test
# in the gz-common library. Therefore, the collada exporter test
# cannot link to those symbols and must generate its own.
target_sources(UNIT_ColladaExporter_TEST PRIVATE tinyxml2/tinyxml2.cpp)

Expand Down
6 changes: 3 additions & 3 deletions profiler/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ if(IGN_PROFILER_REMOTERY)
endif()

ign_build_tests(
TYPE UNIT
TYPE UNIT
SOURCES ${PROFILER_TESTS}
LIB_DEPS
LIB_DEPS
${profiler_target}
ignition-common${IGN_COMMON_VER}-testing
gz-common${GZ_COMMON_VER}-testing
TEST_LIST profiler_tests)

if(TARGET UNIT_Profiler_Remotery_TEST)
Expand Down
14 changes: 7 additions & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
${DL_TARGET}
${CXX_FILESYSTEM_LIBRARIES}
PUBLIC
ignition-utils${IGN_UTILS_VER}::ignition-utils${IGN_UTILS_VER}
gz-utils${GZ_UTILS_VER}::gz-utils${GZ_UTILS_VER}
)

# This is required by the WorkerPool::WaitForResults(const Time &_timeout)
# TODO(anyone): IGN_DEPRECATED(4). Remove this part when the method is removed
target_include_directories(${PROJECT_LIBRARY_TARGET_NAME} PRIVATE
${ignition-math${IGN_MATH_VER}_INCLUDE_DIRS})
${gz-math${GZ_MATH_VER}_INCLUDE_DIRS})

# Handle non-Windows configuration settings
if(NOT WIN32)
Expand All @@ -39,8 +39,8 @@ else()
PRIVATE shlwapi)
endif()

# don't build MovingWindowFilter_TEST if we don't have ignition-math
if(NOT ignition-math${IGN_MATH_VER}_FOUND)
# don't build MovingWindowFilter_TEST if we don't have gz-math
if(NOT gz-math${GZ_MATH_VER}_FOUND)
list(REMOVE_ITEM gtest_sources MovingWindowFilter_TEST.cc)
endif()

Expand All @@ -49,15 +49,15 @@ ign_build_tests(
TYPE UNIT
SOURCES ${gtest_sources}
LIB_DEPS
ignition-utils${IGN_UTILS_VER}::ignition-utils${IGN_UTILS_VER}
ignition-common${IGN_COMMON_VER}-testing
gz-utils${GZ_UTILS_VER}::gz-utils${GZ_UTILS_VER}
gz-common${GZ_COMMON_VER}-testing
INCLUDE_DIRS
# Used to make internal source file headers visible to the unit tests
${CMAKE_CURRENT_SOURCE_DIR})

if(TARGET UNIT_MovingWindowFilter_TEST)
target_include_directories(UNIT_MovingWindowFilter_TEST PRIVATE
${ignition-math${IGN_MATH_VER}_INCLUDE_DIRS})
${gz-math${GZ_MATH_VER}_INCLUDE_DIRS})
endif()

if(TARGET UNIT_PluginLoader_TEST)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif()
ign_build_tests(
TYPE INTEGRATION
SOURCES ${tests}
LIB_DEPS ignition-common${IGN_COMMON_VER}-testing
LIB_DEPS gz-common${GZ_COMMON_VER}-testing
)

if(TARGET INTEGRATION_plugin)
Expand Down

0 comments on commit 65b2e51

Please sign in to comment.