Code Monkey home page Code Monkey logo

Comments (8)

MouriNaruto avatar MouriNaruto commented on July 17, 2024

vcpkg 可以用 VC-LTL,只是需要加一些 triplet 和对 vcpkg 本体 CMake 脚本进行一些添加

毛利

from vc-ltl5.

mingkuang-Chuyu avatar mingkuang-Chuyu commented on July 17, 2024

可以,不是有VC-LTL helper for cmake.cmake?自己稍微改改 vcpkg 就可以做到了

from vc-ltl5.

wangwenx190 avatar wangwenx190 commented on July 17, 2024

vcpkg可以使用VC-LTL,自己稍微修改下就可以了,需要改动的地方也很少

from vc-ltl5.

LasmGratel avatar LasmGratel commented on July 17, 2024

from vc-ltl5.

dym21 avatar dym21 commented on July 17, 2024

在windows.cmake里inlcude一下就可以了。

from vc-ltl5.

mingkuang-Chuyu avatar mingkuang-Chuyu commented on July 17, 2024

https://zhuanlan.zhihu.com/p/60369929

这是我以前提出的方案,大家可以参考。

from vc-ltl5.

ouyangyiluo avatar ouyangyiluo commented on July 17, 2024

https://zhuanlan.zhihu.com/p/60369929

这是我之前提出的方案,大家可以参考。

安装错误
PS D:\Source\Repos\vcpkg> vcpkg install zlib-ng:x86-windows-ltl --overlay-triplets=custom-triplets
Computing installation plan...
The following packages will be built and installed:
zlib-ng[core]:x86-windows-ltl -> 2.0.6
Detecting compiler hash for triplet x86-windows-ltl...
error: while detecting compiler information:
The log file content at "D:\Source\Repos\vcpkg\buildtrees\detect_compiler\stdout-x86-windows-ltl.log" is:
-- Found external ninja('1.11.0').
-- Configuring x86-windows-ltl
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:96 (message):
Command failed: "C:/Program Files/Microsoft Visual Studio/2022/Preview/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" -v
Working Directory: D:/Source/Repos/vcpkg/buildtrees/detect_compiler/x86-windows-ltl-rel/vcpkg-parallel-configure
Error code: 1
See logs for more information:
D:\Source\Repos\vcpkg\buildtrees\detect_compiler\config-x86-windows-ltl-CMakeCache.txt.log
D:\Source\Repos\vcpkg\buildtrees\detect_compiler\config-x86-windows-ltl-out.log

Call Stack (most recent call first):
scripts/cmake/vcpkg_configure_cmake.cmake:300 (vcpkg_execute_required_process)
scripts/detect_compiler/portfile.cmake:18 (vcpkg_configure_cmake)
scripts/ports.cmake:147 (include)

error: vcpkg was unable to detect the active compiler's information. See above for the CMake failure output.

D:\Source\Repos\vcpkg\buildtrees\detect_compiler\config-x86-windows-ltl-out.log

[1/1] "C:/Program Files/CMake/bin/cmake.exe" -E chdir ".." "C:/Program Files/CMake/bin/cmake.exe" "D:/Source/Repos/vcpkg/scripts/detect_compiler" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=D:/Source/Repos/vcpkg/packages/detect_compiler_x86-windows-ltl" "-DCMAKE_MAKE_PROGRAM=C:/Program Files/Microsoft Visual Studio/2022/Preview/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/Source/Repos/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x86-windows-ltl" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v143" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/Source/Repos/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x86" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=D:/Source/Repos/vcpkg" "-DZ_VCPKG_ROOT_DIR=D:/Source/Repos/vcpkg" "-D_VCPKG_INSTALLED_DIR=D:/Source/Repos/vcpkg/installed" "-DVCPKG_MANIFEST_INSTALL=OFF"
FAILED: ../CMakeCache.txt
"C:/Program Files/CMake/bin/cmake.exe" -E chdir ".." "C:/Program Files/CMake/bin/cmake.exe" "D:/Source/Repos/vcpkg/scripts/detect_compiler" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=D:/Source/Repos/vcpkg/packages/detect_compiler_x86-windows-ltl" "-DCMAKE_MAKE_PROGRAM=C:/Program Files/Microsoft Visual Studio/2022/Preview/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/Source/Repos/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x86-windows-ltl" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v143" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/Source/Repos/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x86" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=D:/Source/Repos/vcpkg" "-DZ_VCPKG_ROOT_DIR=D:/Source/Repos/vcpkg" "-D_VCPKG_INSTALLED_DIR=D:/Source/Repos/vcpkg/installed" "-DVCPKG_MANIFEST_INSTALL=OFF"
VSCMD_ARG_TGT_ARCH = x86
CMake Error at D:/dev/VC-LTL-5.0.5-Binary/config/config.cmake:141 (if):
if given arguments:

"STREQUAL" "arm64"

Unknown arguments specified
Call Stack (most recent call first):
D:/Source/Repos/vcpkg/scripts/toolchains/VC-LTL helper for cmake.cmake:87 (include)
D:/Source/Repos/vcpkg/scripts/toolchains/windows.cmake:75 (include)
D:/Source/Repos/vcpkg/scripts/buildsystems/vcpkg.cmake:206 (include)
C:/Program Files/CMake/share/cmake-3.24/Modules/CMakeDetermineSystem.cmake:124 (include)
CMakeLists.txt:2 (project)

-- Configuring incomplete, errors occurred!
ninja: build stopped: subcommand failed.

from vc-ltl5.

ouyangyiluo avatar ouyangyiluo commented on July 17, 2024

``> > https://zhuanlan.zhihu.com/p/60369929

这是我之前提出的方案,大家可以参考。

安装错误 PS D:\Source\Repos\vcpkg> vcpkg install zlib-ng:x86-windows-ltl --overlay-triplets=custom-triplets Computing installation plan... The following packages will be built and installed: zlib-ng[core]:x86-windows-ltl -> 2.0.6 Detecting compiler hash for triplet x86-windows-ltl... error: while detecting compiler information: The log file content at "D:\Source\Repos\vcpkg\buildtrees\detect_compiler\stdout-x86-windows-ltl.log" is: -- Found external ninja('1.11.0'). -- Configuring x86-windows-ltl CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:96 (message): Command failed: "C:/Program Files/Microsoft Visual Studio/2022/Preview/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" -v Working Directory: D:/Source/Repos/vcpkg/buildtrees/detect_compiler/x86-windows-ltl-rel/vcpkg-parallel-configure Error code: 1 See logs for more information: D:\Source\Repos\vcpkg\buildtrees\detect_compiler\config-x86-windows-ltl-CMakeCache.txt.log D:\Source\Repos\vcpkg\buildtrees\detect_compiler\config-x86-windows-ltl-out.log

Call Stack (most recent call first): scripts/cmake/vcpkg_configure_cmake.cmake:300 (vcpkg_execute_required_process) scripts/detect_compiler/portfile.cmake:18 (vcpkg_configure_cmake) scripts/ports.cmake:147 (include)

error: vcpkg was unable to detect the active compiler's information. See above for the CMake failure output.

D:\Source\Repos\vcpkg\buildtrees\detect_compiler\config-x86-windows-ltl-out.log

[1/1] "C:/Program Files/CMake/bin/cmake.exe" -E chdir ".." "C:/Program Files/CMake/bin/cmake.exe" "D:/Source/Repos/vcpkg/scripts/detect_compiler" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=D:/Source/Repos/vcpkg/packages/detect_compiler_x86-windows-ltl" "-DCMAKE_MAKE_PROGRAM=C:/Program Files/Microsoft Visual Studio/2022/Preview/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/Source/Repos/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x86-windows-ltl" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v143" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/Source/Repos/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x86" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=D:/Source/Repos/vcpkg" "-DZ_VCPKG_ROOT_DIR=D:/Source/Repos/vcpkg" "-D_VCPKG_INSTALLED_DIR=D:/Source/Repos/vcpkg/installed" "-DVCPKG_MANIFEST_INSTALL=OFF" FAILED: ../CMakeCache.txt "C:/Program Files/CMake/bin/cmake.exe" -E chdir ".." "C:/Program Files/CMake/bin/cmake.exe" "D:/Source/Repos/vcpkg/scripts/detect_compiler" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=D:/Source/Repos/vcpkg/packages/detect_compiler_x86-windows-ltl" "-DCMAKE_MAKE_PROGRAM=C:/Program Files/Microsoft Visual Studio/2022/Preview/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/Source/Repos/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x86-windows-ltl" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v143" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=D:/Source/Repos/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x86" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=D:/Source/Repos/vcpkg" "-DZ_VCPKG_ROOT_DIR=D:/Source/Repos/vcpkg" "-D_VCPKG_INSTALLED_DIR=D:/Source/Repos/vcpkg/installed" "-DVCPKG_MANIFEST_INSTALL=OFF" VSCMD_ARG_TGT_ARCH = x86 CMake Error at D:/dev/VC-LTL-5.0.5-Binary/config/config.cmake:141 (if): if given arguments:

"STREQUAL" "arm64"

Unknown arguments specified Call Stack (most recent call first): D:/Source/Repos/vcpkg/scripts/toolchains/VC-LTL helper for cmake.cmake:87 (include) D:/Source/Repos/vcpkg/scripts/toolchains/windows.cmake:75 (include) D:/Source/Repos/vcpkg/scripts/buildsystems/vcpkg.cmake:206 (include) C:/Program Files/CMake/share/cmake-3.24/Modules/CMakeDetermineSystem.cmake:124 (include) CMakeLists.txt:2 (project)

-- Configuring incomplete, errors occurred! ninja: build stopped: subcommand failed.

通过以下修改,我现在可以用了

在这里

elseif(MSVC_VERSION)

增加

	elseif(VCPKG_TARGET_ARCHITECTURE)
	    message("VCPKG_TARGET_ARCHITECTURE = " ${VCPKG_TARGET_ARCHITECTURE})
    	if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
            set(LTLPlatform "Win32")
        elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
            set(LTLPlatform "x64")
        elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
            set(LTLPlatform "arm")
        elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
            set(LTLPlatform "arm64")
        else()
            message(WARNING "VC-LTL not load, Unknown Platform!!!")
            set(SupportLTL "false")
        endif()

from vc-ltl5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.