diff --git a/examples/hello_world_plugin/CMakeLists.txt b/examples/hello_world_plugin/CMakeLists.txt index e1036550e..eba430be2 100644 --- a/examples/hello_world_plugin/CMakeLists.txt +++ b/examples/hello_world_plugin/CMakeLists.txt @@ -1,16 +1,19 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR) -set(IGN_PLUGIN_VER 1) -set(IGN_COMMON_VER 3) - find_package(ignition-rendering7 REQUIRED) +set(IGN_RENDERING_VER ${ignition-rendering7_VERSION_MAJOR}) + find_package(ignition-plugin1 REQUIRED COMPONENTS all) +set(IGN_PLUGIN_VER ${ignition-plugin1_VERSION_MAJOR}) + +find_package(ignition-common5 REQUIRED) +set(IGN_COMMON_VER ${ignition-common5_VERSION_MAJOR}) add_library(HelloWorldPlugin SHARED HelloWorldPlugin.cc) target_link_libraries(HelloWorldPlugin PUBLIC - ${IGNITION-RENDERING_LIBRARIES} - ${ignition-common${IGN_COMMON_VER}_LIBRARIES} + ignition-rendering${IGN_RENDERING_VER}::ignition-rendering${IGN_RENDERING_VER} + ignition-common${IGN_COMMON_VER}::ignition-common${IGN_COMMON_VER} PRIVATE ignition-plugin${IGN_PLUGIN_VER}::register )