Lymphatus / caesium-image-compressor

Caesium is an image compression software that helps you store, send and share digital pictures, supporting JPG, PNG, WebP and TIFF formats. You can quickly reduce the file size (and resolution, if you want) by preserving the overall quality of the image.
https://saerasoft.com/caesium
GNU General Public License v3.0
3.47k stars 209 forks source link

Fix CMakeLists.txt error #209

Closed 4G3NT closed 1 year ago

4G3NT commented 1 year ago

Don't read CMAKE_BUILD_TYPE if it's not defined in order to fix an error:

CMake Error at CMakeLists.txt:75 (string): string no output variable specified

-- Configuring incomplete, errors occurred!

4G3NT commented 1 year ago

We can also have CMAKE_PREFIX_PATH default to a valid value, but since the cmake file spits out an understandable error, I don't think that's necessary.

Lymphatus commented 1 year ago

For CMAKE_PREFIX_PATH it's a bit harder to have a default value. It varies upon platforms and you can always customize the Qt path for your specific setup. If you give a default value and that is not correct, the error that will come out is far harder to understand than the one that's in place right now.

4G3NT commented 1 year ago

Yeah, good point it's really hard to set it to a good default.

4G3NT commented 1 year ago

Second if statement might be unnecessary too.

Lymphatus commented 1 year ago

I'm no cmake expert whatsover and the current file is a bit of a mess, result of many trials and errors in the past. It works now, but I'd like to refactor it a little bit to make it more clear and useful in the future. It also helps that now Github Actions are in place and there's an automated way to know if a script works on all platforms at once.

4G3NT commented 1 year ago

I will delete the if statement as it is unnecessary and I will add another fix for the INSTALL make target.