test/CMakeLists.txt   |    1 +
 test/pdf-inspector.cc |    3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 5242a057594f3e635727a3b2f482a3aace10a0e4
Author: Albert Astals Cid <[email protected]>
Date:   Sun Sep 29 12:19:52 2019 +0200

    pdf-inspector: Support builddir != srcdir

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 875da791..09b2e67a 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -43,6 +43,7 @@ if (GTK_FOUND)
     )
     poppler_add_test(pdf-inspector BUILD_GTK_TESTS ${pdf_inspector_SRCS})
     target_link_libraries(pdf-inspector ${CAIRO_LIBRARIES} 
${FREETYPE_LIBRARIES} ${common_libs} ${GTK3_LIBRARIES} poppler)
+    target_compile_definitions(pdf-inspector PRIVATE 
-DSRC_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
     if(CMAKE_USE_PTHREADS_INIT)
        target_link_libraries(pdf-inspector Threads::Threads)
     endif()
diff --git a/test/pdf-inspector.cc b/test/pdf-inspector.cc
index 1af646ec..d2df5e30 100644
--- a/test/pdf-inspector.cc
+++ b/test/pdf-inspector.cc
@@ -4,6 +4,7 @@
 //
 // Copyright 2005 Jonathan Blandford <[email protected]>
 // Copyright 2018 Adam Reichold <[email protected]>
+// Copyright 2019 Albert Astals Cid <[email protected]>
 //
 //========================================================================
 
@@ -69,7 +70,7 @@ PdfInspector::PdfInspector(void)
   
   builder = gtk_builder_new ();
 
-  if (!gtk_builder_add_from_file (builder, "./pdf-inspector.ui", &error))
+  if (!gtk_builder_add_from_file (builder, SRC_DIR "/pdf-inspector.ui", 
&error))
   {
     g_warning ("Couldn't load builder file: %s", error->message);
     g_error_free (error);
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to