summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-03-13 17:10:45 +0800
committerruki <[email protected]>2022-03-13 17:10:54 +0800
commita853f8718c494fb69293a6088e581d255f27d5f7 (patch)
treeb63ebb2e97252a968c86b92aa99a162a1741c368
parentfd3212860f087849cd59c0435f66da2aac52f32a (diff)
fix cmake finder
-rw-r--r--xmake/modules/package/manager/cmake/find_package.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/package/manager/cmake/find_package.lua b/xmake/modules/package/manager/cmake/find_package.lua
index d9abd6b00..134b14c3e 100644
--- a/xmake/modules/package/manager/cmake/find_package.lua
+++ b/xmake/modules/package/manager/cmake/find_package.lua
@@ -56,7 +56,7 @@ function _find_package(cmake, name, opt)
local moduledirs = configs.moduledirs or opt.moduledirs
if moduledirs then
for _, moduledir in ipairs(moduledirs) do
- cmakefile:print("add_cmake_modules(%s)", moduledir)
+ cmakefile:print("list(APPEND CMAKE_MODULE_PATH \"%s\")", (moduledir:gsub("\\", "/")))
end
end
-- e.g. set(Boost_USE_STATIC_LIB ON)