Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename CMake project to gz #267

Merged
merged 3 commits into from
Jun 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ cmake_minimum_required(VERSION 3.5.1 FATAL_ERROR)
#============================================================================
# Initialize the project
#============================================================================
project(ignition-fuel_tools8 VERSION 8.0.0)
project(gz-fuel_tools8 VERSION 8.0.0)

#============================================================================
# Find ignition-cmake
# Find gz-cmake
#============================================================================
# If you get an error at this line, you need to install ignition-cmake
find_package(ignition-cmake3 REQUIRED)
set(IGN_CMAKE_VER ${ignition-cmake3_VERSION_MAJOR})
# If you get an error at this line, you need to install gz-cmake
find_package(gz-cmake3 REQUIRED)
set(GZ_CMAKE_VER ${gz-cmake3_VERSION_MAJOR})

#============================================================================
# Configure the project
Expand Down Expand Up @@ -48,27 +48,27 @@ gz_find_package(YAML REQUIRED PRIVATE)
gz_find_package(ZIP REQUIRED PRIVATE)

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

#--------------------------------------
# Find ignition-common
gz_find_package(ignition-common5 REQUIRED PRIVATE)
set(IGN_COMMON_MAJOR_VER ${ignition-common5_VERSION_MAJOR})
# Find gz-common
gz_find_package(gz-common5 REQUIRED PRIVATE)
set(GZ_COMMON_VER ${gz-common5_VERSION_MAJOR})

#--------------------------------------
# Find ignition-math
gz_find_package(ignition-math7 REQUIRED PRIVATE)
set(IGN_MSGS_MAJOR_VER ${ignition-math7_VERSION_MAJOR})
# Find gz-math
gz_find_package(gz-math7 REQUIRED PRIVATE)
set(GZ_MATH_VER ${gz-math7_VERSION_MAJOR})

#--------------------------------------
# Find ignition-msgs
gz_find_package(ignition-msgs9 REQUIRED PRIVATE)
set(IGN_MSGS_MAJOR_VER ${ignition-msgs9_VERSION_MAJOR})
# Find gz-msgs
gz_find_package(gz-msgs9 REQUIRED PRIVATE)
set(GZ_MSGS_VER ${gz-msgs9_VERSION_MAJOR})

#--------------------------------------
# Find ignition-tools
# Find gz-tools
find_program(HAVE_GZ_TOOLS gz)

#============================================================================
Expand Down Expand Up @@ -96,5 +96,5 @@ gz_create_docs(
API_MAINPAGE_MD "${CMAKE_BINARY_DIR}/api.md"
TUTORIALS_MAINPAGE_MD "${CMAKE_BINARY_DIR}/tutorials.md"
TAGFILES
"${IGNITION-COMMON_DOXYGEN_TAGFILE} = ${IGNITION-COMMON_API_URL}"
"${GZ-COMMON_DOXYGEN_TAGFILE} = ${GZ-COMMON_API_URL}"
)
2 changes: 1 addition & 1 deletion doc/ignition.in
Original file line number Diff line number Diff line change
Expand Up @@ -2080,7 +2080,7 @@ SKIP_FUNCTION_MACROS = NO
# run, you must also specify the path to the tagfile here.

TAGFILES = "@IGNITION_CMAKE_DOXYGEN_DIR@/cppreference.tag.xml = http://en.cppreference.com/w" \
"IGNITION-MSGS_DOXYGEN_TAGFILE@ = @IGNITION-MSGS_API_URL@"
"GZ-MSGS_DOXYGEN_TAGFILE@ = @GZ-MSGS_API_URL@"

# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
# tag file that is based on the input files it reads. See section "Linking to
Expand Down
25 changes: 9 additions & 16 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

project(fuel-tools-examples)

# Find the Gazebo Fuel Tools library
find_package(ignition-fuel_tools8 QUIET REQUIRED)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IGNITION-FUEL-TOOLS_CXX_FLAGS}")
include_directories(
${IGNITION-COMMON_INCLUDE_DIRS}
${IGNITION-FUEL_TOOLS_INCLUDE_DIRS}
)
link_directories(
${IGNITION-COMMON_LIBRARY_DIRS}
${IGNITION-FUEL_TOOLS_LIBRARY_DIRS}
)
find_package(gz-fuel_tools8 QUIET REQUIRED)
set(GZ_FUEL_TOOLS_VER ${gz-fuel_tools8_VERSION_MAJOR})

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GZ-FUEL-TOOLS_CXX_FLAGS}")

# GFlags
find_library(gflags_LIBRARIES NAMES gflags)
Expand All @@ -25,24 +21,21 @@ endif()
if (EXISTS "${CMAKE_SOURCE_DIR}/list.cc")
add_executable(list list.cc)
target_link_libraries(list
${IGNITION-COMMON_LIBRARIES}
${IGNITION-FUEL_TOOLS_LIBRARIES}
gz-fuel_tools${GZ_FUEL_TOOLS_VER}::gz-fuel_tools${GZ_FUEL_TOOLS_VER}
${gflags_LIBRARIES})
endif()

if (EXISTS "${CMAKE_SOURCE_DIR}/download.cc")
add_executable(download download.cc)
target_link_libraries(download
${IGNITION-COMMON_LIBRARIES}
${IGNITION-FUEL_TOOLS_LIBRARIES}
gz-fuel_tools${GZ_FUEL_TOOLS_VER}::gz-fuel_tools${GZ_FUEL_TOOLS_VER}
${gflags_LIBRARIES})
endif()

if (EXISTS "${CMAKE_SOURCE_DIR}/details.cc")
add_executable(details details.cc)
target_link_libraries(details
${IGNITION-COMMON_LIBRARIES}
${IGNITION-FUEL_TOOLS_LIBRARIES}
gz-fuel_tools${GZ_FUEL_TOOLS_VER}::gz-fuel_tools${GZ_FUEL_TOOLS_VER}
${gflags_LIBRARIES})
endif()

Expand Down
10 changes: 5 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ gz_create_core_library(SOURCES ${sources} CXX_STANDARD 17)
# Link the libraries that we always need.
target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
PUBLIC
ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER}
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
PRIVATE
ignition-msgs${IGN_MSGS_MAJOR_VER}::ignition-msgs${IGN_MSGS_MAJOR_VER}
gz-msgs${GZ_MSGS_VER}::gz-msgs${GZ_MSGS_VER}
curl::curl
${JSONCPP_TARGET}
TINYXML2::TINYXML2
Expand All @@ -59,8 +59,8 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
)

gz_target_interface_include_directories(${PROJECT_LIBRARY_TARGET_NAME}
ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER}
ignition-msgs${IGN_MSGS_MAJOR_VER}::ignition-msgs${IGN_MSGS_MAJOR_VER}
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
gz-msgs${GZ_MSGS_VER}::gz-msgs${GZ_MSGS_VER}
)


Expand All @@ -69,7 +69,7 @@ gz_build_tests(TYPE UNIT
SOURCES ${gtest_sources}
TEST_LIST test_targets
LIB_DEPS
ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER}
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
TINYXML2::TINYXML2
)

Expand Down
2 changes: 1 addition & 1 deletion test/integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ link_directories(${PROJECT_BINARY_DIR}/test)

gz_build_tests(TYPE INTEGRATION
SOURCES ${tests}
LIB_DEPS ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER}
LIB_DEPS gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
)