diasurgical / devilutionX

Diablo build for modern operating systems
Other
8.08k stars 795 forks source link

Don't use user-supplied VERSION_NUM when building DevilutionX #7411

Closed ephphatha closed 2 months ago

ephphatha commented 2 months ago

Reported by Schnapple in discord while preparing the mac source ports build, if a build is run via cmake -DVERSION_NUM=<num> then VERSION_PREFIX doesn't get set and PROJECT_VERSION_WITH_SUFFIX ends up empty.

Also didn't appear to be a reason for the second capture group... certainly no need to make it optional when it could be zero characters anyway.

glebm commented 2 months ago

Either way, nobody should be providing version numbers explicitly, we have a VERSION file for that

ephphatha commented 2 months ago

removed the guard that checks if VERSION_NUM is already defined. There's still a guard around VERSION_SUFFIX but I think that's only used to display the text on the menu so doeesn't matter as much if people provide custom values here.