File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,15 +145,15 @@ target_include_directories(wasmtime INTERFACE ${CMAKE_BINARY_DIR}/include)
145145configure_file (
146146 ${CMAKE_CURRENT_SOURCE_DIR} /include/wasmtime/conf.h.in
147147 ${WASMTIME_GENERATED_CONF_H} )
148- add_custom_target (conf_h
149- DEPENDS ${WASMTIME_GENERATED_CONF_H} )
150148
151149include (GNUInstallDirs )
152150install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} /include/
153151 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
152+ COMPONENT Headers
154153 FILES_MATCHING REGEX "\\ .hh?$" )
155154install (FILES ${WASMTIME_GENERATED_CONF_H}
156- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} /wasmtime)
155+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} /wasmtime
156+ COMPONENT Headers)
157157install (FILES ${WASMTIME_SHARED_FILES} ${WASMTIME_STATIC_FILES}
158158 DESTINATION ${CMAKE_INSTALL_LIBDIR} )
159159
@@ -172,3 +172,5 @@ add_custom_target(doc
172172 COMMAND doxygen ${DOXYGEN_CONF_OUT}
173173 DEPENDS ${WASMTIME_GENERATED_CONF_H} ${DOXYGEN_CONF_OUT}
174174 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
175+ add_custom_target (headers
176+ COMMAND ${CMAKE_COMMAND} --install ${CMAKE_BINARY_DIR} --component Headers )
Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ fn main() {
5959 // Wasm C API headers.
6060 cfg
6161 . include (std :: env :: var (" DEP_WASMTIME_C_API_INCLUDE" ). unwrap ());
62- . include (std :: env :: var (" DEP_WASMTIME_C_API_CONF_INCLUDE" ). unwrap ());
6362
6463 // Compile your C code.
6564 cfg
Original file line number Diff line number Diff line change @@ -28,14 +28,14 @@ fn main() {
2828 let mut config = cmake:: Config :: new ( & dir) ;
2929 config
3030 . define ( "WASMTIME_DISABLE_ALL_FEATURES" , "ON" )
31- . build_target ( "conf_h" ) ;
31+ . always_configure ( true )
32+ . build_target ( "headers" ) ;
3233 for f in FEATURES {
3334 if env:: var_os ( format ! ( "CARGO_FEATURE_{}" , f) ) . is_some ( ) {
3435 config. define ( format ! ( "WASMTIME_FEATURE_{}" , f) , "ON" ) ;
3536 }
3637 }
3738 let dst = config. build ( ) ;
3839
39- println ! ( "cargo:conf-include={}/build/include" , dst. display( ) ) ;
40- println ! ( "cargo:include={}/include" , dir. display( ) ) ;
40+ println ! ( "cargo:include={}/include" , dst. display( ) ) ;
4141}
You can’t perform that action at this time.
0 commit comments