Closed CaeruleusAqua closed 4 years ago
Nice! Thank you very much!
However, I don't think that installing two headers which have the same name as the package is pollution. And this may break many packages that depend on cminpack. Can you please remove installation of includes in a subdir, or do you expect me to do it (in which case it will take time).
Done!
I also switched off the caching of the version string. Because if it is on, the version will not be reset on multiple cmake runs, causing the version Regex to run multiple times and fail.
Done!
I also switched off the caching of the version string. Because if it is on, the version will not be reset on multiple cmake runs, causing the version Regex to run multiple times and fail.
As the syntax for CACHED and non-CACHED variables is different, the set
command now fills the CMINPACK_VERSION variable with a string list.
This breaks pkgconfig file generation, see #55
The test run failed on my system (Win10 VS2019) because the test executable was not found, the macro now uses a generator expression to get the test executable (should work on all systems).
Since cmake provides an automated way to generate a CMinpackConfig.cmake that should work across platforms, I included this. Mainly to integrate CMinpack into vcpkg.
The main advantage of this is that you can import targets instead of variables. In addition this should be much more portable.
With the new CMinpackConfig.cmake, you must use it as follows:
Done! The include directory is imported automatically, also debug, release builds are processed automatically! The inlcude headers are prepended in cminpack-1/ because I don't like to pollute the global header namespace. You can change this behavior by changing the following lines:
to: