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
+3 -3
View File
@@ -1,6 +1,6 @@
include(${CMAKE_SOURCE_DIR}/cmake/bazel.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/option.cmake)
include(${PROJECT_ROOT_DIR}/cmake/bazel.cmake)
include(${PROJECT_ROOT_DIR}/cmake/option.cmake)
if(APPLE)
set(APPLE_FRAMEWORK_LIBS
@@ -35,7 +35,7 @@ foreach(CC_SRCS ${ALL_TEST_SRCS})
${CMAKE_THREAD_LIBS_INIT}
${CMAKE_DL_LIBS}
SRCS ${CC_SRCS}
INCS . ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/db ${CMAKE_SOURCE_DIR}/src/db/common
INCS . ${PROJECT_ROOT_DIR}/src ${PROJECT_ROOT_DIR}/src/db ${PROJECT_ROOT_DIR}/src/db/common
LDFLAGS ${APPLE_FRAMEWORK_LIBS}
)
cc_test_suite(zvec_sqlengine ${CC_TARGET})