What if I really do want a package to install an EXE? #39476
dennisferron
started this conversation in
General
Replies: 1 comment
-
Ports can have executables. Many ports do. However, they are not allowed to stay in For CMake-based ports, this is generally resolved by calling |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on a project and vcpkg port for that project. I got the following message.
warning: The following EXEs were found in /bin or /debug/bin. EXEs are not valid distribution targets.
C:\source\vcpkg\packages\antlr4-testrig-runner_x64-mingw-static\debug\bin\antlr4-testrig-runner.exe
warning: There should be no bin\ directory in a static build, but C:\source\vcpkg\packages\antlr4-testrig-runner_x64-mingw-static\bin is present.
The thing is, the point of my project is actually to do the very thing vcpkg is warning about. What I'm trying to accomplish is make available a CMake function, similar to "antlr4_generate()" from the antlr4 vcpkg port, but that when you run it adds a target that runs the antlr4 TestRig tool (in Java).
(I just realized a nuance here is that, while ultimately I will have it work the way I just described, in the meantime while developing the project I have it directly building the test rig executable during build of the package - without waiting for the user CMakeLists.txt to call a function to do so. That could be salient here; I'm not sure.)
In order to make the ANTLR4 TestRig runnable from the Run/Debug menu of an IDE like CLion (as opposed to launching the ANTLR4 TestRig from CMake during configuration or build steps), there has to be a C++ executable associated with it somehow. I wrote a C++ main that just launches a Java process that runs the TestRig class from the ANTLR4 .jar file.
Obviously I could get around the vcpkg problem by just providing this in the form of a library and making the user incorporate it into their own executable (and I'm still not sure yet if I can get an add_executable performed inside a package to show up as a top level Run/Debug target in CLion IDE), but I was wondering if there's a work around or if providing EXE's in vcpkg is just a nonstarter?
For instance maybe I could/should install the executable to a different location than .../bin; perhaps .../test?
Beta Was this translation helpful? Give feedback.
All reactions