@@ -3,24 +3,23 @@ cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
33project (gz-common-examples)
44
55# Find the gz-common library
6- find_package (gz-common7 QUIET REQUIRED COMPONENTS events profiler)
7- set (GZ_COMMON_VER ${gz-common7_VERSION_MAJOR})
6+ find_package (gz-common QUIET REQUIRED COMPONENTS events profiler)
87
98add_executable (assert_example assert_example.cc)
10- target_link_libraries (assert_example gz-common${GZ_COMMON_VER} ::core)
9+ target_link_libraries (assert_example gz-common::core)
1110
1211add_executable (console_example console.cc)
13- target_link_libraries (console_example gz-common${GZ_COMMON_VER} ::core)
12+ target_link_libraries (console_example gz-common::core)
1413
1514add_executable (events_example events.cc)
16- target_link_libraries (events_example gz-common${GZ_COMMON_VER} ::events)
15+ target_link_libraries (events_example gz-common::events)
1716
1817add_executable (profiler_example profiler.cc)
19- target_link_libraries (profiler_example gz-common${GZ_COMMON_VER} ::profiler)
18+ target_link_libraries (profiler_example gz-common::profiler)
2019target_compile_definitions (profiler_example PUBLIC "GZ_PROFILER_ENABLE=1" )
2120
2221add_executable (logging_performance logging_performance.cc)
23- target_link_libraries (logging_performance gz-common${GZ_COMMON_VER} ::core)
22+ target_link_libraries (logging_performance gz-common::core)
2423
2524add_executable (util_example util.cc)
26- target_link_libraries (util_example gz-common${GZ_COMMON_VER} ::core)
25+ target_link_libraries (util_example gz-common::core)
0 commit comments