File tree 3 files changed +8
-7
lines changed 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -145,15 +145,15 @@ target_include_directories(wasmtime INTERFACE ${CMAKE_BINARY_DIR}/include)
145
145
configure_file (
146
146
${CMAKE_CURRENT_SOURCE_DIR} /include /wasmtime/conf.h.in
147
147
${WASMTIME_GENERATED_CONF_H} )
148
- add_custom_target (conf_h
149
- DEPENDS ${WASMTIME_GENERATED_CONF_H} )
150
148
151
149
include (GNUInstallDirs)
152
150
install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} /include /
153
151
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
152
+ COMPONENT Headers
154
153
FILES_MATCHING REGEX "\\ .hh?$" )
155
154
install (FILES ${WASMTIME_GENERATED_CONF_H}
156
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} /wasmtime)
155
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} /wasmtime
156
+ COMPONENT Headers)
157
157
install (FILES ${WASMTIME_SHARED_FILES} ${WASMTIME_STATIC_FILES}
158
158
DESTINATION ${CMAKE_INSTALL_LIBDIR} )
159
159
@@ -172,3 +172,5 @@ add_custom_target(doc
172
172
COMMAND doxygen ${DOXYGEN_CONF_OUT}
173
173
DEPENDS ${WASMTIME_GENERATED_CONF_H} ${DOXYGEN_CONF_OUT}
174
174
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() {
59
59
// Wasm C API headers.
60
60
cfg
61
61
. include (std :: env :: var (" DEP_WASMTIME_C_API_INCLUDE" ). unwrap ());
62
- . include (std :: env :: var (" DEP_WASMTIME_C_API_CONF_INCLUDE" ). unwrap ());
63
62
64
63
// Compile your C code.
65
64
cfg
Original file line number Diff line number Diff line change @@ -28,14 +28,14 @@ fn main() {
28
28
let mut config = cmake:: Config :: new ( & dir) ;
29
29
config
30
30
. define ( "WASMTIME_DISABLE_ALL_FEATURES" , "ON" )
31
- . build_target ( "conf_h" ) ;
31
+ . always_configure ( true )
32
+ . build_target ( "headers" ) ;
32
33
for f in FEATURES {
33
34
if env:: var_os ( format ! ( "CARGO_FEATURE_{}" , f) ) . is_some ( ) {
34
35
config. define ( format ! ( "WASMTIME_FEATURE_{}" , f) , "ON" ) ;
35
36
}
36
37
}
37
38
let dst = config. build ( ) ;
38
39
39
- println ! ( "cargo:conf-include={}/build/include" , dst. display( ) ) ;
40
- println ! ( "cargo:include={}/include" , dir. display( ) ) ;
40
+ println ! ( "cargo:include={}/include" , dst. display( ) ) ;
41
41
}
You can’t perform that action at this time.
0 commit comments