Commit 21338733bacaa53b8c53758d0b2c68e9ef543147 broke the autodetection
of LibOFX. This patch fixes this and allows successful compiliation
while ENABLE_OFXIMPORTER is ON and LibOFX is not being installed.
Details
- Reviewers
wojnilowicz - Commits
- R261:1e47498c6cad: Fix automatic libofx detection
Installed LibOFX, ran cmake: OFX was enabled and KMyMoney compiled
Uninstalled LibOFX, ran cmake: OFX was disabled and KMyMoney compiled
Reinstalled LibOFX, ran cmake: OFX was enabled and KMyMoney compiled
Diff Detail
- Repository
- R261 KMyMoney
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
CMakeLists.txt | ||
---|---|---|
120–121 | If OFX should be enabled by default, then maybe we should use CMAKE_DEPENDENT_OPTION somwhere here. | |
kmymoney/plugins/ofx/CMakeLists.txt | ||
1 ↗ | (On Diff #24540) | This defies whole purpose of ENABLE_OFXIMPORTER. |
kmymoney/plugins/ofx/CMakeLists.txt | ||
---|---|---|
1 ↗ | (On Diff #24540) | Then simply set ENABLE_OFXIMPORTER to OFF and you should be set. Maybe, we need to unset LIBOFX_FOUND outside of any condition to make this work properly. BTW: OFX should be enabled without any further action if found. It might be disabled if user explicitly desires so. (this is the known and documented behavior based on the former variable ENABLE_LIBOFX and must not be changed.) |
I did so and ofximporter got build anyway. Is that expected behaviour after your patch?
I think that building OFX based on LIBOFX_FOUND is misleading as it states that OFX should be build no matter what provided that LibOFX is present.
I think that ENABLE_OFXIMPORTER should be conditioned also by LIBOFX_FOUND and building of OFX should be based on ENABLE_OFXIMPORTER which clearly states the intent.
Improve detection and settings of OFX support
Allow to manually disable OFX support even if it LibOFX is detected.
Default of support is ON if LibOFX is detected.
What was the final decision regarding default behavior if OFX is not mentioned at all explicitly in the cmake command? I am OK with either behavior, but want to be sure it is what is intended.
I now tend to agree with Lucas that the default should be OFF: if you want it, you have to ask for it. However, I understand this is not the historic default behavior.
To confirm, testing just now, without mentioning anything about OFX on the cmake command line, cmake does say it finds libofx 0.9.11 and it does find LIBOFX_HAVE_CLIENTUID, but the configure results says OFX plugin: no.