-
-
Notifications
You must be signed in to change notification settings - Fork 872
Open
Labels
Description
你在什么场景下需要该功能?
原本编译正常的一个项目,有使用一个开源库(fmt)源码编译,方式如下:
package("fmt")
add_deps("cmake")
set_sourcedir(path.join(os.scriptdir(), "deps/fmt"))
on_install(function (package)
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=Release")
import("package.tools.cmake").install(package, configs)
end)
package_end()
后来修改整个项目目录名称后,编译失败。
分析发现,在build/.packages下,编译好的 ftm的cmake 用的绝对路径,
build/.packages/f/fmt/latest/cache/build_4e0143c9/CPackConfig.cmake
set(CPACK_BUILD_SOURCE_DIRS "/home/user/proj/octopus/deps/fmt;/home/user/proj/octopus/build/.packages/f/fmt/latest/cache/build_4e0143c9")
修改项目路径后,导致找不到了。
所以,能不能用相对路径呢?
描述可能的解决方案
使用相对路径。
描述你认为的候选方案
No response
其他信息
No response