]> git.siccegge.de Git - frida/frida.git/commitdiff
Install the guile-frida-bindings into system library path
authorChristoph Egger <Christoph.Egger@fau.de>
Wed, 18 Mar 2015 18:31:55 +0000 (19:31 +0100)
committerChristoph Egger <Christoph.Egger@fau.de>
Wed, 18 Mar 2015 18:31:55 +0000 (19:31 +0100)
Allows using only name in scm_load_module -- can be overwritten for
testing and works with the final binary. Would be even better if we
could hide the module in a private directory but I haven't found a nice
way so far

CMakeLists.txt
src/bindings/Guile.cxx

index aa3d082c7df988faafe09e9403572fce74e2d61b..36cf17e0a99b5d826eee7d744e6e1dc26ab1911e 100644 (file)
@@ -138,9 +138,14 @@ enable_testing()
 add_test(NAME fridatest COMMAND fridatest ${CMAKE_SOURCE_DIR})
 target_link_libraries(fridatest gmock gtest ${QT_LIBRARIES} ${LLVM_LDFLAGS} -lLLVM-3.5 ${LLVM_SYSTEM_LIBS} ${LOG4CXX_LDFLAGS} ${GUILE_LDFLAGS} ${QUAZIP_LIBRARIES})
 target_compile_options(fridatest PRIVATE -DCONFIG_TEST)
+set_property(TEST fridatest
+  APPEND PROPERTY ENVIRONMENT LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR})
 
 install(TARGETS frida
   RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
 
-install(TARGETS guilePlugin guile-frida-binding
+install(TARGETS guilePlugin
   DESTINATION ${CMAKE_INSTALL_LIBDIR}/frida/plugins/Interpreter)
+
+install(TARGETS guile-frida-binding
+  DESTINATION ${CMAKE_INSTALL_LIBDIR})
\ No newline at end of file
index c452e7667dafc5225251274d99ca9782f929a5b2..12fd32f35befb6ec9885631e32ce9e6979de9fcb 100644 (file)
@@ -13,7 +13,7 @@ GuileInterpreter::GuileInterpreter() {
 
        scm_c_use_module("system repl server");
        scm_call_0(scm_c_public_ref("system repl server", "spawn-server"));
-       scm_c_load_extension(CONFIG_LIBDIR "/frida/plugins/Interpreter/libguile-frida-binding",
+       scm_c_load_extension("libguile-frida-binding",
                             "scm_init_frida_module");
 
        guile_output_port = scm_open_output_string();