Skip to content

Commit

Permalink
build: install package version, ref #180
Browse files Browse the repository at this point in the history
  • Loading branch information
iboB committed Nov 11, 2024
1 parent 72a2e3d commit 3175228
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ endif()

#################
# export and install
configure_file(
ac-local-config-version.in.cmake
ac-local-config-version.cmake
@ONLY
)

set(namespace ac::)

# export
Expand Down
8 changes: 8 additions & 0 deletions ac-local-config-version.in.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) Alpaca Core
# SPDX-License-Identifier: MIT
#
set(PACKAGE_VERSION @PROJECT_VERSION@)
if(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_COMPATIBLE YES)
set(PACKAGE_VERSION_EXACT YES)
endif()

0 comments on commit 3175228

Please sign in to comment.