Comments (7)
路径问题,你可以来个 pr 改进下,改成反斜杠
from xrepo-cmake.
路径问题,你可以来个 pr 改进下,改成反斜杠
看了下脚本,应该是这里的问题
Line 479 in 3024f04
通过 xrepo fetch xx --json 获取路径信息,后面加下判断如果是windows,就把反斜杠做下处理
但是改了下还是不对,试了几种都不行,报的错都是 target_include_directories called with invalid arguments
1 把 \\ 替换为 /
2 把 \\ 替换为 \\\\
3 把 \\\\ 替换为 //
execute_process(COMMAND ${XREPO_CMD} fetch ${_deps} --json ${_xrepo_cmdargs}
OUTPUT_VARIABLE json_output
ERROR_VARIABLE json_error_output
RESULT_VARIABLE exit_code)
if(NOT "${exit_code}" STREQUAL "0")
message(STATUS "xrepo fetch --json:")
message(STATUS "STDOUT:\n${json_output}")
message(STATUS "STDERR:\n${json_error_output}")
message(FATAL_ERROR "xrepo fetch --json failed, exit code: ${exit_code}")
endif()
if (WIN32)
string(REPLACE "\\" "/" json_output ${json_output})
endif()
Rebuild CMake cache
1 > @DELETE "D:/temp/testedx/testxx/.edx/cmake/gcc-mgw64-13.1/Debug"
>>>>
2 > D:\tools\mingw64-gcc-13.1-full\bin\cmake.exe -B "D:/temp/testedx/testxx/.edx/cmake/gcc-mgw64-13.1/Debug" -S "D:/temp/testedx/testxx" -G "CodeBlocks - Ninja" -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_CXX_COMPILER="D:/tools/mingw64-gcc-13.1-full/bin/x86_64-w64-mingw32-g++.exe;-ftabstop=1" -DCMAKE_C_COMPILER="D:/tools/mingw64-gcc-13.1-full/bin/x86_64-w64-mingw32-gcc.exe;-ftabstop=1" -DCMAKE_RC_COMPILER="D:/tools/mingw64-gcc-13.1-full/bin/windres.exe" -DCMAKE_CXX_COMPILER_LAUNCHER="D:/tools/mingw64-gcc-13.1-full/bin/ccache.exe" -DCMAKE_CXX_COMPILER_LAUNCHER="D:/tools/mingw64-gcc-13.1-full/bin/ccache.exe"
-- The C compiler identification is GNU 13.1.0
-- The CXX compiler identification is GNU 13.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/tools/mingw64-gcc-13.1-full/bin/x86_64-w64-mingw32-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/tools/mingw64-gcc-13.1-full/bin/x86_64-w64-mingw32-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- xmake command: C:/Users/Administrator/xmake/xmake.exe
-- xrepo: fetch --json: ON
-- xrepo: CMAKE_C_COMPILER=D:/tools/mingw64-gcc-13.1-full/bin/x86_64-w64-mingw32-gcc.exe CMAKE_CXX_COMPILER=D:/tools/mingw64-gcc-13.1-full/bin/x86_64-w64-mingw32-g++.exe using system default toolchain.
-- xrepo: C:/Users/Administrator/xmake/xmake.exe lua private.xrepo install zlib
-- xrepo: zlib_INCLUDE_DIRS C://Users//Administrator//AppData//Local//.xmake//packages//z//zlib//v1.2.13//04bf9d8a64824100b68e5c59e579eda6//include
-- xrepo: zlib_LIBRARY_DIRS C://Users//Administrator//AppData//Local//.xmake//packages//z//zlib//v1.2.13//04bf9d8a64824100b68e5c59e579eda6//lib
-- xrepo: zlib_LIBRARIES zlib
-- xrepo: zlib prepend to CMAKE_PREFIX_PATH: C:/Users/Administrator/AppData/Local/.xmake/packages/z/zlib/v1.2.13/04bf9d8a64824100b68e5c59e579eda6
-- xrepo: target_include_directories(testxx C://Users//Administrator//AppData//Local//.xmake//packages//z//zlib//v1.2.13//04bf9d8a64824100b68e5c59e579eda6//include)
CMake Error at .edx/cmake/xrepo.cmake:395 (target_include_directories):
target_include_directories called with invalid arguments
Call Stack (most recent call first):
CMakeLists.txt:23 (xrepo_target_packages)
-- xrepo: target_link_directories(testxx C://Users//Administrator//AppData//Local//.xmake//packages//z//zlib//v1.2.13//04bf9d8a64824100b68e5c59e579eda6//lib)
CMake Error at .edx/cmake/xrepo.cmake:399 (target_link_directories):
target_link_directories called with invalid arguments
Call Stack (most recent call first):
CMakeLists.txt:23 (xrepo_target_packages)
-- xrepo: target_link_libraries(testxx zlib)
-- Configuring incomplete, errors occurred!
>>>>
task failed 4.355 s, 0 error(s), 0 warning(s)
>
from xrepo-cmake.
json 里面也有转义字符,不在 json 里面替换,后面实际路径替换呢
from xrepo-cmake.
from xrepo-cmake.
from xrepo-cmake.
oo ,貌似不是转义的问题,是需要加个 PRIVATE,_visibility 这个变量为空了
from xrepo-cmake.
可以了,提了pr
from xrepo-cmake.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xrepo-cmake.