fix(build): replace CMAKE_SOURCE_DIR with PROJECT_ROOT_DIR for subproject builds (#195)

This commit is contained in:
feihongxu0824
2026-03-04 20:01:52 +08:00
committed by GitHub
parent dbcabd8f44
commit fb0b900a80
25 changed files with 47 additions and 46 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
include(${CMAKE_SOURCE_DIR}/cmake/bazel.cmake)
include(${PROJECT_ROOT_DIR}/cmake/bazel.cmake)
file(GLOB_RECURSE ALL_TEST_SRCS *_test.cc)
@@ -9,6 +9,6 @@ foreach(CC_SRCS ${ALL_TEST_SRCS})
STRICT
LIBS zvec_ailego core_framework core_utility core_metric core_quantizer core_knn_flat
SRCS ${CC_SRCS}
INCS . ${CMAKE_SOURCE_DIR}/src/core ${CMAKE_SOURCE_DIR}/src/core/algorithm
INCS . ${PROJECT_ROOT_DIR}/src/core ${PROJECT_ROOT_DIR}/src/core/algorithm
)
endforeach()