-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dokan_fuse: Add libfuse-compatible pkg-config #375
Conversation
Then wait with the testing for now. On a second thought, I can also use it while building the FUSE-mirror, the comments in the code even suggest to get the CFLAGS and LDFLAGS using the pkg-config....
|
About option 3: I thought about this more and noticed that we would need the correct Dokan version for a dokanfuse.pc. So this is dependent on some other work I planned to be doing (refactor how the version number gets embedded in the build). This might take a bit more time (which I do not have right now, I am afraid. So, for this PR we have two possibilities: Wait until we can do it perfectly (retrieve the version) or simply implement option 2: "Add some option to cmake that allows one to disable the installation of fuse.pc ( What do you think? |
No problem, second option is also great 👍 |
Generate a pkg-config-file that can be used as a drop-in "replacement" for libfuse, i.e. $ pkg-config --libs --cflags fuse will return the dokanfuse-flags. Closes dokan-dev#338.
Now modified the build-script to use pkg-config. |
Thank you @Rondom ! We will wait 1.1.0 to merge this so ❤️ (and test it on windows at this moment) |
@Rondom shoud we merge this 👍 ? |
Sure |
Thank you @Rondom 😍 ! |
Don't merge yet. This needs further testing and input.
This fixes #338.
This generates a pkg-config-file that can be used as a drop-in "replacement" for libfuse, i.e.
will return the dokanfuse-flags.
Required testing
I have only tested this on Debian Stretch. Thus, it is lacking testing on Windows. I would be happy if someone could test it on
I currently do not have any working Windows-system at hand to test myself.
You can add
-DCMAKE_INSTALL_PREFIX="/tmp/usr/
to the cmake-invokation to define another prefix to avoid cluttering your global directories while testing. You can then use thePKG_CONFIG_PATH
environment-variable to point pkg-config to the rightlib/pkgconfig
-dir.Situations to test:
cd build && cmake .. && make install
)-DCMAKE_INSTALL_LIBDIR=/some/absolute/path/that/is/different
and-DCMAKE_INSTALL_INCLUDEDIR=/some/absolute/path/that/is/different
).I am a bit confused about whether we need to use LIBDIR or BINDIR, because I was unfamiliar with the Windows-only concept of "import libraries" (research shows that it had historic reasons to support compiling for OS/2 from NT without having the OS/2 DLLs).
Discussion
The pkg-config-file will be installed as
fuse.pc
. So we kind of snatch the libfuse name. This could be considered problematic for users that prefer to have different fuse-libaries installed. I have some suggestions for thatdokanfuse.pc
and add an option like-DINSTALL_PKG_CONFIG=(both|fuse|dokanfuse|none)
, default would be both