Skip to content

Commit

Permalink
Migrate CMake files
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <methylDragon@gmail.com>
  • Loading branch information
methylDragon committed Apr 27, 2022
1 parent 76b71ce commit ea5baa1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ find_package(ignition-cmake3 REQUIRED)
# Configure the project
#============================================================================
set(c++standard 17)
ign_configure_project(VERSION_SUFFIX pre1)
ign_configure_project(
REPLACE_IGNITION_INCLUDE_PATH gz/utils
VERSION_SUFFIX pre1)

#============================================================================
# Set project-specific options
Expand Down
10 changes: 5 additions & 5 deletions cli/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
# target_include_directories(@tgt@ INTERFACE "$<BUILD_INTERFACE:@incl_dirs>")
# that for the usual include directories are handled by ign_add_component
if(IGN_UTILS_VENDOR_CLI11)
add_subdirectory(vendored-cli/ignition/utils)
target_include_directories(${ign_utils_cli_target_name}
add_subdirectory(vendored-cli/gz/utils)
target_include_directories(${gz_utils_cli_target_name}
INTERFACE
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/cli/include/vendored-cli>")
else()
add_subdirectory(external-cli/ignition/utils)
target_include_directories(${ign_utils_cli_target_name}
add_subdirectory(external-cli/gz/utils)
target_include_directories(${gz_utils_cli_target_name}
INTERFACE
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/cli/include/external-cli>")
endif()

add_subdirectory(ignition/utils)
add_subdirectory(gz/utils)
8 changes: 4 additions & 4 deletions cli/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ ign_add_component(
cli
INTERFACE
INDEPENDENT_FROM_PROJECT_LIB
GET_TARGET_NAME ign_utils_cli_target_name)
GET_TARGET_NAME gz_utils_cli_target_name)

# Make sure that the name is visible also in cli/include/CMakeLists.txt
set(ign_utils_cli_target_name ${ign_utils_cli_target_name} PARENT_SCOPE)
set(gz_utils_cli_target_name ${gz_utils_cli_target_name} PARENT_SCOPE)
if(NOT IGN_UTILS_VENDOR_CLI11)
target_link_libraries(${ign_utils_cli_target_name} INTERFACE CLI11::CLI11)
target_link_libraries(${gz_utils_cli_target_name} INTERFACE CLI11::CLI11)
endif()

ign_get_libsources_and_unittests(sources gtest_sources)
ign_build_tests(TYPE UNIT
SOURCES ${gtest_sources}
LIB_DEPS
${ign_utils_cli_target_name}
${gz_utils_cli_target_name}
)
3 changes: 2 additions & 1 deletion include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
add_subdirectory(ignition)
add_subdirectory(gz)
install(DIRECTORY ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL})

0 comments on commit ea5baa1

Please sign in to comment.