Skip to content
Extraits de code Groupes Projets
Vérifiée Valider f84085e1 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 26291e0f
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) ...@@ -303,11 +303,7 @@ if(GENERATE_MANPAGES)
endif() endif()
target_include_directories(lkt PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/inc) target_include_directories(lkt PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/inc)
target_include_directories(lektord PRIVATE target_include_directories(lektord PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/inc ${CURL_INCLUDE_DIRS})
${CMAKE_CURRENT_SOURCE_DIR}/inc
${CMAKE_CURRENT_SOURCE_DIR}/src/rust/liblektor-rs/inc
${CURL_INCLUDE_DIRS}
)
target_compile_definitions(lkt PRIVATE ${common_DEFINITIONS}) target_compile_definitions(lkt PRIVATE ${common_DEFINITIONS})
target_compile_definitions(lektord PRIVATE ${common_DEFINITIONS} target_compile_definitions(lektord PRIVATE ${common_DEFINITIONS}
...@@ -400,4 +396,3 @@ foreach(CMD IN LISTS MANPAGE_COMMANDS) ...@@ -400,4 +396,3 @@ foreach(CMD IN LISTS MANPAGE_COMMANDS)
endforeach() endforeach()
qt_finalize_executable(lektord) qt_finalize_executable(lektord)
...@@ -30,11 +30,9 @@ fn rerun_directory<T: AsRef<Path> + ?Sized>(dir: &T) { ...@@ -30,11 +30,9 @@ fn rerun_directory<T: AsRef<Path> + ?Sized>(dir: &T) {
fn main() { fn main() {
// Because the target folder was fixed, we know where the source folder is! // 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 = env::var_os("OUT_DIR").unwrap();
let out_dir = Path::new(&out_dir); let out_dir = Path::new(&out_dir)
let db_path = out_dir
.join("kara.db")
.canonicalize() .canonicalize()
.expect("failed to canonicalize the sample kara database path"); .expect("failed to canonicalize OUT_DIR");
let source_dir = out_dir let source_dir = out_dir
.join("../../../../../liblektor-rs") .join("../../../../../liblektor-rs")
.canonicalize() .canonicalize()
...@@ -44,7 +42,9 @@ fn main() { ...@@ -44,7 +42,9 @@ fn main() {
.canonicalize() .canonicalize()
.expect("failed to canonicalize the migration dir"); .expect("failed to canonicalize the migration dir");
let db_path = out_dir.join("kara.db");
let _ = std::fs::remove_file(&db_path); let _ = std::fs::remove_file(&db_path);
env::set_var("DATABASE_URL", db_path); env::set_var("DATABASE_URL", db_path);
env::set_current_dir(source_dir).expect("failed to cwd to source folder!"); env::set_current_dir(source_dir).expect("failed to cwd to source folder!");
cmd!( "diesel" => [ "migration", "run" ] ); cmd!( "diesel" => [ "migration", "run" ] );
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter