Add -DVERSION flag for release version numbers

This commit is contained in:
Sebastian Noack 2017-04-26 11:29:30 +02:00
parent 595a19c390
commit 235e6b653d

6
main.c
View File

@ -451,11 +451,7 @@ int main(int argc, char **argv) {
socket_path = optarg; socket_path = optarg;
break; break;
case 'v': case 'v':
#if defined SWAY_GIT_VERSION && defined SWAY_GIT_BRANCH && defined SWAY_VERSION_DATE fprintf(stdout, "swaylock version " SWAY_VERSION "\n");
fprintf(stdout, "swaylock version %s (%s, branch \"%s\")\n", SWAY_GIT_VERSION, SWAY_VERSION_DATE, SWAY_GIT_BRANCH);
#else
fprintf(stdout, "version not detected\n");
#endif
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
break; break;
case 'u': case 'u':