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 29, 2022
1 parent c489f8d commit 0c81b19
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ set(IGN_CMAKE_VER ${ignition-cmake3_VERSION_MAJOR})
#============================================================================
# Configure the project
#============================================================================
ign_configure_project(VERSION_SUFFIX pre0)
ign_configure_project(
REPLACE_IGNITION_INCLUDE_PATH gz/plugin
VERSION_SUFFIX pre0)


#============================================================================
Expand Down
3 changes: 2 additions & 1 deletion core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ ign_build_tests(
SOURCES ${tests})


add_subdirectory(include/ignition/plugin)
add_subdirectory(include/gz/plugin)
install(DIRECTORY ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL})
6 changes: 3 additions & 3 deletions loader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ign_get_libsources_and_unittests(sources tests)

# Disable ign_TEST if ignition-tools is not found
if (MSVC OR NOT IGN_TOOLS_PROGRAM)
list(REMOVE_ITEM tests src/ign_TEST.cc)
list(REMOVE_ITEM tests src/gz_TEST.cc)
endif()

# Create the library target
Expand Down Expand Up @@ -41,11 +41,11 @@ foreach(test ${test_targets})

endforeach()

if(TARGET UNIT_ign_TEST)
if(TARGET UNIT_gz_TEST)
set(_env_vars)
list(APPEND _env_vars "IGN_CONFIG_PATH=${CMAKE_BINARY_DIR}/test/conf/$<CONFIG>")

set_tests_properties(UNIT_ign_TEST PROPERTIES
set_tests_properties(UNIT_gz_TEST PROPERTIES
ENVIRONMENT "${_env_vars}")
endif()

Expand Down
6 changes: 3 additions & 3 deletions loader/conf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Used only for internal testing.
set(ign_library_path "${CMAKE_BINARY_DIR}/test/lib/$<CONFIG>/ruby/ignition/cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}")
set(gz_library_path "${CMAKE_BINARY_DIR}/test/lib/$<CONFIG>/ruby/gz/cmd${IGN_DESIGNATION}${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 @@ -13,7 +13,7 @@ file(GENERATE
INPUT "${CMAKE_CURRENT_BINARY_DIR}/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml.configured")

# Used for the installed version.
set(ign_library_path "${CMAKE_INSTALL_PREFIX}/lib/ruby/ignition/cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}")
set(gz_library_path "${CMAKE_INSTALL_PREFIX}/lib/ruby/gz/cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}")

# Generate the configuration file that is installed.
# Note that the major version of the library is included in the name.
Expand All @@ -24,4 +24,4 @@ configure_file(

# Install the yaml configuration files in an unversioned location.
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml
DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/ignition/)
DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/gz/)
2 changes: 1 addition & 1 deletion loader/src/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ target_link_libraries(ign PUBLIC
${PROJECT_LIBRARY_TARGET_NAME}
)

set(plugin_executable ign-plugin)
set(plugin_executable ignition-plugin)
add_executable(${plugin_executable} plugin_main.cc)
target_link_libraries(${plugin_executable}
ign
Expand Down

0 comments on commit 0c81b19

Please sign in to comment.