smanders / externpro

build external projects with cmake
MIT License
13 stars 12 forks source link

xpGenerateResources Version.hpp enhancements #281

Closed smanders closed 4 years ago

smanders commented 4 years ago

there are several projects that

set(PACKAGE_VERSION_MAJOR ${CMAKE_PROJECT_VERSION_MAJOR})
set(PACKAGE_VERSION_MINOR ${CMAKE_PROJECT_VERSION_MINOR})
set(PACKAGE_VERSION_PATCH ${CMAKE_PROJECT_VERSION_PATCH})
set(PACKAGE_VERSION_TWEAK ${CMAKE_PROJECT_VERSION_TWEAK})
set(FILE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(FILE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(FILE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
set(FILE_VERSION_TWEAK ${PROJECT_VERSION_TWEAK})

and this should really just be the default...

using CMAKE_PROJECT_VERSION for PACKAGE_VERSION and PROJECT_VERSION for FILE_VERSION is really kind of an enhancement on "utilize PROJECT_VERSION" issue https://github.com/smanders/externpro/issues/232

smanders commented 4 years ago

variables used by xpGenerateResources() and the cmake-generated Version.hpp that should have defaults defined by externpro cmake

PACKAGE_NAME

PACKAGE_VERSION[_MAJOR|_MINOR|_PATCH|_TWEAK]

FILE_VERSION[_MAJOR|_MINOR|_PATCH|_TWEAK]

FILE_DESC

smanders commented 4 years ago

completed with commit to dev branch referenced above