Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 22d253c7 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

RUST: Fix liblektor-rs build.rs file + move include files in the top level inc folder

parent c846e5b7
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -303,11 +303,7 @@ if(GENERATE_MANPAGES)
endif()
target_include_directories(lkt PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/inc)
target_include_directories(lektord PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/inc
${CMAKE_CURRENT_SOURCE_DIR}/src/rust/liblektor-rs/inc
${CURL_INCLUDE_DIRS}
)
target_include_directories(lektord PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/inc ${CURL_INCLUDE_DIRS})
target_compile_definitions(lkt PRIVATE ${common_DEFINITIONS})
target_compile_definitions(lektord PRIVATE ${common_DEFINITIONS}
......@@ -400,4 +396,3 @@ foreach(CMD IN LISTS MANPAGE_COMMANDS)
endforeach()
qt_finalize_executable(lektord)
......@@ -30,11 +30,9 @@ fn rerun_directory<T: AsRef<Path> + ?Sized>(dir: &T) {
fn main() {
// Because the target folder was fixed, we know where the source folder is!
let out_dir = env::var_os("OUT_DIR").unwrap();
let out_dir = Path::new(&out_dir);
let db_path = out_dir
.join("kara.db")
let out_dir = Path::new(&out_dir)
.canonicalize()
.expect("failed to canonicalize the sample kara database path");
.expect("failed to canonicalize OUT_DIR");
let source_dir = out_dir
.join("../../../../../liblektor-rs")
.canonicalize()
......@@ -44,7 +42,9 @@ fn main() {
.canonicalize()
.expect("failed to canonicalize the migration dir");
let db_path = out_dir.join("kara.db");
let _ = std::fs::remove_file(&db_path);
env::set_var("DATABASE_URL", db_path);
env::set_current_dir(source_dir).expect("failed to cwd to source folder!");
cmd!( "diesel" => [ "migration", "run" ] );
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter