[vlmc-devel] cmake: Update to the new cmake version way
Hugo Beauzée-Luyssen
git at videolan.org
Fri Apr 1 23:56:10 CEST 2016
vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Apr 1 23:07:29 2016 +0200| [18bc927dfb0f2d5d9d0c5297d678715464e4367c] | committer: Hugo Beauzée-Luyssen
cmake: Update to the new cmake version way
Properly fix #13
> https://code.videolan.org/videolan/vlmc/commit/18bc927dfb0f2d5d9d0c5297d678715464e4367c
---
CMakeLists.txt | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cde5855..a31c8f9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,17 +43,16 @@ IF(GIT)
ENDIF(GIT)
# version: 0.2.x
-SET(CPACK_PACKAGE_VERSION_MAJOR "0")
-SET(CPACK_PACKAGE_VERSION_MINOR "2")
-SET(CPACK_PACKAGE_VERSION_PATCH "0")
-SET(CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
-SET(PROJECT_VERSION_MAJOR ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR})
-SET(PROJECT_VERSION ${CPACK_PACKAGE_VERSION})
+cmake_policy(SET CMP0048 NEW)
+STRING(TOLOWER ${PROJECT_NAME_SHORT} PROJECT_NAME_SHORT_LOWER)
+PROJECT(${PROJECT_NAME_SHORT_LOWER} VERSION 0.2.0)
-MESSAGE(STATUS "VLMC Version: ${PROJECT_VERSION}")
+MESSAGE(STATUS "VLMC Version: ${CPACK_PACKAGE_VERSION}")
-STRING(TOLOWER ${PROJECT_NAME_SHORT} PROJECT_NAME_SHORT_LOWER)
-PROJECT(${PROJECT_NAME_SHORT_LOWER}-${PROJECT_VERSION})
+SET(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
+SET(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
+SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
+SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
# Codename of the Project :-)
SET(CODENAME "alpha")
More information about the Vlmc-devel
mailing list