blob: 4e039f9f246cc474aab4418c3ce01034bea9ee1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
cmake_minimum_required(VERSION 3.24)
project(cxx_modules_install_bmi CXX)
include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake")
add_library(install_bmi STATIC)
target_sources(install_bmi
PUBLIC
FILE_SET CXX_MODULES
BASE_DIRS
"${CMAKE_CURRENT_SOURCE_DIR}"
FILES
importable.cxx)
target_compile_features(install_bmi PUBLIC cxx_std_20)
install(TARGETS install_bmi
ARCHIVE DESTINATION "lib"
CXX_MODULES_BMI DESTINATION "lib/cxx/bmi")
add_test(NAME check-for-bmi
COMMAND
"${CMAKE_COMMAND}"
"-Dprefix=${CMAKE_INSTALL_PREFIX}"
"-Ddestination=lib/cxx/bmi"
-P "${CMAKE_CURRENT_SOURCE_DIR}/check-for-bmi.cmake")
|