Skip to content

Commit 7232f65

Browse files
weipenganakryiko
authored andcommitted
examples/c: Unify the way to get the path of libblazesym.
Signed-off-by: weipeng <[email protected]>
1 parent d93213e commit 7232f65

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

examples/c/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ if(CARGO_EXISTS)
5959
message((FATAL_ERROR "Unsupported platform: ${CMAKE_SYSTEM_NAME}"))
6060
endif()
6161

62-
set(LIBBLAZESYM_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../blazesym/target/${CARGO_TARGET}/release/libblazesym_c.a)
63-
6462
ExternalProject_Add(blazesym
6563
PREFIX blazesym
6664
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../blazesym
@@ -73,8 +71,6 @@ if(CARGO_EXISTS)
7371
STEP_TARGETS build
7472
)
7573
else() # Host
76-
set(LIBBLAZESYM_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../blazesym/target/release/libblazesym_c.a)
77-
7874
ExternalProject_Add(blazesym
7975
PREFIX blazesym
8076
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../blazesym
@@ -130,7 +126,7 @@ foreach(app ${apps})
130126
target_include_directories(${app_stem} PRIVATE
131127
${CMAKE_CURRENT_SOURCE_DIR}/../../blazesym/capi/include)
132128
target_link_libraries(${app_stem}
133-
${LIBBLAZESYM_PATH} -lpthread -lrt -ldl)
129+
${CMAKE_CURRENT_SOURCE_DIR}/../../blazesym/target/${CARGO_TARGET}/release/libblazesym_c.a -lpthread -lrt -ldl)
134130
add_dependencies(${app_stem} blazesym-build)
135131
endif()
136132
endforeach()

0 commit comments

Comments
 (0)