microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.23k stars 6.4k forks source link

add libmodbus #283

Closed mazalet closed 6 years ago

mazalet commented 8 years ago

https://github.com/stephane/libmodbus

please help. thanks.

mattiascibien commented 7 years ago

This one seem to require Python for build. I am not sure if it is supported. can someone confirm this?

alexkaratarakis commented 7 years ago

EDIT: This comment is outdated, see next one.

It is "supported", in the sense that vcpkg is agnostic to any underlying build system.

libuv also requires python to build. You can take a look at libuv's portfile: vcpkg edit libuv

Basically, it requires the user to download and install python. Since it is a reasonably-sized block of code, it might be worthwhile to extract it in a function, like vcpkg_find_python2.

EDIT: If it needs python3, then vcpkg_find_acquire_program.cmake can help you with that.

alexkaratarakis commented 7 years ago

I have moved acquisition of PYTHON2 in vcpg_find_acquire_program.cmake (d933562a584a9acb47dde9ba7e41f0128cb8763b) You can now do (depending on which python you need): vcpkg_find_acquire_program(PYTHON3) or vcpkg_find_acquire_program(PYTHON2)

Python3 will be automatically acquired. Python2 is only available via msi, so it will ask the user to download and install it.