Skip to content

CMake: use PROJECT_VERSION for PROJECTM_LIB_VERSION#1009

Open
keeper-of-memes wants to merge 1 commit into
projectM-visualizer:masterfrom
keeper-of-memes:upstream-cmake-project-version
Open

CMake: use PROJECT_VERSION for PROJECTM_LIB_VERSION#1009
keeper-of-memes wants to merge 1 commit into
projectM-visualizer:masterfrom
keeper-of-memes:upstream-cmake-project-version

Conversation

@keeper-of-memes

Copy link
Copy Markdown

CMAKE_PROJECT_VERSION refers to the top-level project() call, so when libprojectM is built as a subdirectory of another CMake project (add_subdirectory or FetchContent), PROJECTM_LIB_VERSION picks up the parent project's version instead of projectM's own. PROJECT_VERSION is scoped to the nearest project() call and yields the correct value in both standalone and embedded builds.

One line; no behaviour change for standalone builds.

CMAKE_PROJECT_VERSION refers to the top-level project() call, so when
libprojectM is built as a subdirectory of another CMake project
(add_subdirectory or FetchContent), PROJECTM_LIB_VERSION picks up the
parent project's version instead of projectM's own. PROJECT_VERSION is
scoped to the nearest project() call and yields the correct value in
both standalone and embedded builds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant