Skip to content

Commit a0fdf61

Browse files
authored
Update how C API headers are installed (#11478)
Currently a script is used which means that at install-time a `*.cmake` script is run. While I thought this inherited CMake configuration options turns out it doesn't so the installed headers don't actually reflect the configured features at build time. This commit changes this to install from the headers-in-the-build-directory which indeed do reflect features.
1 parent 3d4bd05 commit a0fdf61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/c-api/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ set(WASMTIME_HEADER_DST ${CMAKE_BINARY_DIR}/include)
109109
include(cmake/install-headers.cmake)
110110

111111
include(GNUInstallDirs)
112-
install(SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/cmake/install-headers.cmake)
112+
install(DIRECTORY "${WASMTIME_HEADER_DST}/" TYPE INCLUDE)
113113
install(FILES ${WASMTIME_SHARED_FILES} ${WASMTIME_STATIC_FILES}
114114
DESTINATION ${CMAKE_INSTALL_LIBDIR})
115115

0 commit comments

Comments
 (0)