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

[ign -> gz] CMake functions #264

Merged
merged 1 commit into from
Jun 17, 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
26 changes: 13 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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/fuel_tools
VERSION_SUFFIX pre1)

Expand All @@ -29,42 +29,42 @@ ign_configure_project(

#--------------------------------------
# Find Tinyxml2
ign_find_package(TINYXML2 REQUIRED PRIVATE PRETTY tinyxml2)
gz_find_package(TINYXML2 REQUIRED PRIVATE PRETTY tinyxml2)

#--------------------------------------
# Find libcurl
ign_find_package(IgnCURL REQUIRED PRIVATE PRETTY curl)
gz_find_package(IgnCURL REQUIRED PRIVATE PRETTY curl)

#--------------------------------------
# Find jsoncpp
ign_find_package(JSONCPP REQUIRED PRIVATE)
gz_find_package(JSONCPP REQUIRED PRIVATE)

#--------------------------------------
# Find libyaml
ign_find_package(YAML REQUIRED PRIVATE)
gz_find_package(YAML REQUIRED PRIVATE)

#--------------------------------------
# Find libzip
ign_find_package(ZIP REQUIRED PRIVATE)
gz_find_package(ZIP REQUIRED PRIVATE)

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

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

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

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

#--------------------------------------
Expand All @@ -74,7 +74,7 @@ find_program(HAVE_IGN_TOOLS ign)
#============================================================================
# Configure the build
#============================================================================
ign_configure_build(QUIT_IF_BUILD_ERRORS)
gz_configure_build(QUIT_IF_BUILD_ERRORS)

#============================================================================
# ign command line support
Expand All @@ -84,15 +84,15 @@ add_subdirectory(conf)
#============================================================================
# Create package information
#============================================================================
ign_create_packages()
gz_create_packages()

#============================================================================
# Configure documentation
#============================================================================
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
Expand Down
4 changes: 2 additions & 2 deletions conf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(ign_library_path "${CMAKE_BINARY_DIR}/src/cmd/cmdfuel${PROJECT_VERSION_MAJOR}")
set(gz_library_path "${CMAKE_BINARY_DIR}/src/cmd/cmdfuel${PROJECT_VERSION_MAJOR}")

# Generate a configuration file for internal testing.
# Note that the major version of the library is included in the name.
Expand All @@ -7,7 +7,7 @@ configure_file(
"fuel.yaml.in"
"${CMAKE_BINARY_DIR}/test/conf/fuel${PROJECT_VERSION_MAJOR}.yaml" @ONLY)

set(ign_library_path "${CMAKE_INSTALL_PREFIX}/lib/ruby/ignition/cmdfuel${PROJECT_VERSION_MAJOR}")
set(gz_library_path "${CMAKE_INSTALL_PREFIX}/lib/ruby/ignition/cmdfuel${PROJECT_VERSION_MAJOR}")

# Generate a configuration file.
# Note that the major version of the library is included in the name.
Expand Down
2 changes: 1 addition & 1 deletion conf/fuel.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
format: 1.0.0
library_name: @PROJECT_NAME_NO_VERSION@
library_version: @PROJECT_VERSION_FULL@
library_path: @ign_library_path@
library_path: @gz_library_path@
commands:
- fuel : Manage simulation resources.
---
2 changes: 1 addition & 1 deletion include/gz/fuel_tools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ign_install_all_headers()
gz_install_all_headers()
6 changes: 3 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if (HAVE_IGN_TOOLS)
endif()

# Create the library target.
ign_create_core_library(SOURCES ${sources} CXX_STANDARD 17)
gz_create_core_library(SOURCES ${sources} CXX_STANDARD 17)

# Link the libraries that we always need.
target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
Expand All @@ -58,14 +58,14 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
ZIP::ZIP
)

ign_target_interface_include_directories(${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}
)


# Build the unit tests.
ign_build_tests(TYPE UNIT
gz_build_tests(TYPE UNIT
SOURCES ${gtest_sources}
LIB_DEPS
ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER}
Expand Down
2 changes: 1 addition & 1 deletion test/integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set(tests
include_directories(SYSTEM ${CMAKE_BINARY_DIR}/test/)
link_directories(${PROJECT_BINARY_DIR}/test)

ign_build_tests(TYPE INTEGRATION
gz_build_tests(TYPE INTEGRATION
SOURCES ${tests}
LIB_DEPS ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER}
)
2 changes: 1 addition & 1 deletion test/performance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ set(tests

link_directories(${PROJECT_BINARY_DIR}/test)

ign_build_tests(TYPE PERFORMANCE SOURCES ${tests})
gz_build_tests(TYPE PERFORMANCE SOURCES ${tests})
2 changes: 1 addition & 1 deletion test/regression/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ set(tests

link_directories(${PROJECT_BINARY_DIR}/test)

ign_build_tests(TYPE REGRESSION SOURCES ${tests})
gz_build_tests(TYPE REGRESSION SOURCES ${tests})