Coder Social home page Coder Social logo

automate-vcpkg's People

Contributors

ataulien avatar datcaptainhorse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

automate-vcpkg's Issues

Several suggestions

  1. message("Bootstrapping vcpkg in ${VCPKG_ROOT}") should read message(STATUS "Bootstrapping vcpkg in ${VCPKG_ROOT}")
  2. execute_process(COMMAND ${VCPKG_BOOTSTRAP} WORKING_DIRECTORY ${VCPKG_ROOT}) could include -disableMetrics , i.e. execute_process(COMMAND ${VCPKG_BOOTSTRAP} -disableMetrics WORKING_DIRECTORY ${VCPKG_ROOT}). Perhaps make it a configuration parameter?
  3. (nit) You should set your editor to trim trailing whitespace at end of line.

Thanks! Great product.

Moving toolchain include inside else statement fixes first-time CMake generation

Hey! I like your helpful script, saved me from some headaches.. had to do a small modification though. If you are still maintaining this here is what I did:

From here: line 97
To here: line 100

From my testing, those can be moved under else statement at line 92 to fix first-time CMake generation complaining about missing file for the include.

else()
    set(VCPKG_ROOT $ENV{VCPKG_ROOT})

    # We know this wasn't set before so we need point the toolchain file to the newly found VCPKG_ROOT
    set(CMAKE_TOOLCHAIN_FILE ${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake CACHE STRING "")

    # Just setting vcpkg.cmake as toolchain file does not seem to actually pull in the code
    include(${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake)
endif()

arguments string for vcpkg command

Two possible problems. First, in vcpkg_install_packages you have
# Need the given list to be space-separated #string (REPLACE ";" " " PACKAGES_LIST_STR "${ARGN}")
but then
execute_process( COMMAND ${VCPKG_EXEC} install ${ARGN} WORKING_DIRECTORY ${VCPKG_ROOT} )
If the first line matters, then shouldn't that ${ARGN} be ${PACKAGES_LIST_STR}?

Second, the argument list could become too long for the command processor on 'some systems' (you know which I mean) . It should best be processed in a loop.

Better way to check VCPKG_ROOT fallback?

Trying to set VCPKG_ROOT either as ENV or normal variable in parent CMakeLists would result it in being ignored and fallback being used instead.

In my case modifying the check and putting it inside vcpkg_bootstrap works. Not sure if this would work well with environment variable from terminal or such.

if(NOT VCPKG_ROOT)
	set(VCPKG_ROOT ${VCPKG_FALLBACK_ROOT})
endif()

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.