Closed tomghuang closed 3 years ago
I've submitted a pull request to vcpkg (https://github.com/microsoft/vcpkg/pull/18325), and it has passed the code review. Now we're waiting for the pull request being merged.
vcpkg has merged the pull request, so everyone can use the latest vcpkg to install Argtable3 or add it as a dependency in the vcpkg manifest.
The latest vcpkg release allows us to specify dependencies in the manifest file (
vcpkg.json
) in the project root directory. Since vcpkg already includes the 3.1.5 release in its ports, in theory developers should be able to addvcpkg.json
to the root directory to add the argtable3 library:And include the dependencies in the root
CMakeLists.txt
:In the
CMakeLists.txt
file above, we specify that we want to use thex64-windows-static
triplet, which means that we want to use the static library of the dependencies.Now we can run the following commands to download the dependencies and build the project:
However, CMake will show the following error messages:
The root cause of this problem is that argtable3 builds and installs both the dynamic and static libraries at the same time, while vcpkg expects argtable3 to install one of them. We need to modify how the CMake scripts export targets and install export files, so it won't conflict with vcpkg's design.