Commit 802c624ab38494c3e27093af528710b6da28d12f

Sam Lantinga 2022-11-20T14:37:05

Strip trailing newline when reading the VERSION file

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 05bbac4..bf0c5e9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2962,6 +2962,7 @@ set(EXTRA_CFLAGS ${_EXTRA_CFLAGS})
 
 if(EXISTS "${PROJECT_SOURCE_DIR}/VERSION")
   file(READ "${PROJECT_SOURCE_DIR}/VERSION" SDL_SOURCE_VERSION)
+  string(STRIP "${SDL_SOURCE_VERSION}" SDL_SOURCE_VERSION)
 endif()
 
 find_package(Git)