Skip to content

Commit e637bf7

Browse files
committed
Update infra for new beman_install_library function
The new implementation allows us to eliminate the project-specific beman.exemplar-config.cmake.in file in favor of a generic file in infra that correctly adds find_package commands for its dependencies; and also will eventually allow us to add support for installing module targets.
1 parent 4448085 commit e637bf7

12 files changed

Lines changed: 676 additions & 358 deletions

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ option(
2525
)
2626

2727
# for find of beman-install-library
28-
include(infra/cmake/beman-install-library-config.cmake)
28+
include(infra/cmake/beman-install-library.cmake)
2929

3030
add_library(beman.exemplar INTERFACE)
3131
add_library(beman::exemplar ALIAS beman.exemplar)
@@ -42,7 +42,7 @@ set_target_properties(
4242

4343
add_subdirectory(include/beman/exemplar)
4444

45-
beman_install_library(beman.exemplar)
45+
beman_install_library(beman.exemplar TARGETS beman.exemplar)
4646

4747
if(BEMAN_EXEMPLAR_BUILD_TESTS)
4848
enable_testing()

cmake/beman.exemplar-config.cmake.in

Lines changed: 0 additions & 7 deletions
This file was deleted.

cookiecutter/{{cookiecutter.project_name}}/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ option(
2525
)
2626

2727
# for find of beman-install-library
28-
include(infra/cmake/beman-install-library-config.cmake)
28+
include(infra/cmake/beman-install-library.cmake)
2929

3030
{% if cookiecutter.library_type == "interface" %}
3131
add_library(beman.{{cookiecutter.project_name}} INTERFACE)
@@ -49,7 +49,7 @@ add_subdirectory(include/beman/{{cookiecutter.project_name}})
4949
add_subdirectory(src/beman/{{cookiecutter.project_name}})
5050
{% endif %}
5151

52-
beman_install_library(beman.{{cookiecutter.project_name}})
52+
beman_install_library(beman.{{cookiecutter.project_name}} TARGETS beman.{{cookiecutter.project_name}})
5353

5454
if(BEMAN_{{cookiecutter.project_name.upper()}}_BUILD_TESTS)
5555
enable_testing()

cookiecutter/{{cookiecutter.project_name}}/cmake/beman.{{cookiecutter.project_name}}-config.cmake.in

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[beman_submodule]
22
remote=https://github.com/bemanproject/infra.git
3-
commit_hash=322f31d5af0e4c17878ddaba9d3fa6bcca31a7df
3+
commit_hash=63cb577f6484f13ce3349de49ad5ce27e20bf1da
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# cmake/Config.cmake.in -*-makefile-*-
2+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3+
4+
include(CMakeFindDependencyMacro)
5+
6+
@BEMAN_FIND_DEPENDENCIES@
7+
8+
@PACKAGE_INIT@
9+
10+
include(${CMAKE_CURRENT_LIST_DIR}/@[email protected])
11+
12+
check_required_components(@PROJECT_NAME@)

cookiecutter/{{cookiecutter.project_name}}/infra/cmake/beman-install-library-config.cmake

Lines changed: 0 additions & 169 deletions
This file was deleted.

0 commit comments

Comments
 (0)