@@ -87,6 +87,37 @@ 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' : get_option (' json' ) ? ' ON' : ' OFF' ,
99+ ' MCTCLIB_USE_JONQUIL' : ' OFF' ,
100+ ' MCTCLIB_USE_TOMLF' : ' 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+ ]
115+ install_data (
116+ cmake_files,
117+ install_dir : get_option (' libdir' )/ ' cmake' / meson .project_name(),
118+ install_tag : ' devel' ,
119+ )
120+
90121 asciidoc = find_program (' asciidoctor' , required : false )
91122 if asciidoc.found()
92123 install_man (
0 commit comments