@@ -87,6 +87,40 @@ if install
8787 subdirs : ['' , module_id],
8888 )
8989
90+ cmake_data = configuration_data ({
91+ ' PROJECT_NAME' : meson .project_name(),
92+ ' PROJECT_VERSION' : meson .project_version(),
93+ ' PACKAGE_INIT' : '' ,
94+ ' CMAKE_INSTALL_PREFIX' : get_option (' prefix' ),
95+ ' CMAKE_INSTALL_INCLUDEDIR' : get_option (' includedir' ),
96+ ' CMAKE_INSTALL_LIBDIR' : get_option (' libdir' ),
97+ ' MCTCLIB_WITH_OpenMP' : get_option (' openmp' ) ? ' ON' : ' OFF' ,
98+ ' MCTCLIB_WITH_JSON' : jonquil_dep.found() ? ' ON' : ' OFF' ,
99+ ' MCTCLIB_USE_JONQUIL' : jonquil_dep.type_name() != ' internal' ? ' ON' : ' OFF' ,
100+ ' MCTCLIB_USE_TOMLF' : jonquil_dep.type_name() != ' internal' ? ' ON' : ' OFF' ,
101+ ' module-dir' : module_id,
102+ })
103+ cmake_files = [
104+ configure_file (
105+ input : files (' config' / ' template-config.cmake' ),
106+ output : meson .project_name() + ' -config.cmake' ,
107+ configuration : cmake_data,
108+ ),
109+ configure_file (
110+ input : files (' config' / ' template-targets.cmake' ),
111+ output : meson .project_name() + ' -targets.cmake' ,
112+ configuration : cmake_data,
113+ ),
114+ files (' config' / ' cmake' / ' Findjonquil.cmake' ),
115+ files (' config' / ' cmake' / ' Findtoml-f.cmake' ),
116+ files (' config' / ' cmake' / ' mctc-utils.cmake' ),
117+ ]
118+ install_data (
119+ cmake_files,
120+ install_dir : get_option (' libdir' )/ ' cmake' / meson .project_name(),
121+ install_tag : ' devel' ,
122+ )
123+
90124 asciidoc = find_program (' asciidoctor' , required : false )
91125 if asciidoc.found()
92126 install_man (
0 commit comments