mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
C++: Fix build with or without the interpeter feature
This commit is contained in:
parent
66cf903d70
commit
2023ebc9a9
2 changed files with 9 additions and 3 deletions
|
@ -240,10 +240,16 @@ set(generated_headers
|
|||
${CMAKE_CURRENT_BINARY_DIR}/generated_include/slint_qt_internal.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/generated_include/slint_backend_internal.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/generated_include/slint_generated_public.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/generated_include/slint_interpreter_internal.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/generated_include/slint_interpreter_generated_public.h
|
||||
)
|
||||
|
||||
if(SLINT_FEATURE_INTERPRETER)
|
||||
list(APPEND generated_headers
|
||||
${CMAKE_CURRENT_BINARY_DIR}/generated_include/slint_interpreter_internal.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/generated_include/slint_interpreter_generated_public.h
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
foreach(header IN LISTS generated_headers)
|
||||
set_property(TARGET Slint APPEND PROPERTY PUBLIC_HEADER ${header})
|
||||
endforeach()
|
||||
|
|
|
@ -685,7 +685,7 @@ pub fn gen_all(root_dir: &Path, include_dir: &Path) -> anyhow::Result<Vec<PathBu
|
|||
gen_corelib(root_dir, include_dir, &mut deps)?;
|
||||
gen_backend_qt(root_dir, include_dir, &mut deps)?;
|
||||
gen_backend(root_dir, include_dir, &mut deps)?;
|
||||
if std::env::var("CARGO_FEATURE_interpreter").is_ok() {
|
||||
if std::env::var("CARGO_FEATURE_SLINT_INTERPRETER").is_ok() {
|
||||
gen_interpreter(root_dir, include_dir, &mut deps)?;
|
||||
}
|
||||
Ok(deps)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue