diff options
author | Albert Astals Cid <aacid@kde.org> | 2008-03-24 17:14:07 +0100 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2008-03-24 17:14:07 +0100 |
commit | 0222c6ceb0fcf1d7c4422691a68a035a558ad614 (patch) | |
tree | d326c621816572c63ec015b928b033aaf9339b87 /glib | |
parent | 3e4164f2db69358adf07596195842dd00458b621 (diff) |
fix build when using cmake, not sure it's completely ok, but at least i can compile
Diffstat (limited to 'glib')
-rw-r--r-- | glib/CMakeLists.txt | 17 | ||||
-rw-r--r-- | glib/poppler-page.cc | 2 | ||||
-rw-r--r-- | glib/test-poppler-glib.cc | 2 |
3 files changed, 13 insertions, 8 deletions
diff --git a/glib/CMakeLists.txt b/glib/CMakeLists.txt index dfc19996..372d9842 100644 --- a/glib/CMakeLists.txt +++ b/glib/CMakeLists.txt @@ -12,6 +12,10 @@ else (CAIRO_FOUND) set (CAIRO_FEATURE "#undef POPPLER_HAS_CAIRO") endif (CAIRO_FOUND) +if (GDK_FOUND) + add_definitions(${GDK2_CFLAGS}) +endif (GDK_FOUND) + configure_file(poppler-features.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/poppler-features.h) if (GTK_FOUND) @@ -100,10 +104,11 @@ install(FILES DESTINATION include/poppler/glib) - -set(test_poppler_glib_SRCS - test-poppler-glib.cc -) -poppler_add_test(test-poppler-glib BUILD_GTK_TESTS ${test_poppler_glib_SRCS}) -target_link_libraries(test-poppler-glib poppler-glib) +if (GDK_FOUND) + set(test_poppler_glib_SRCS + test-poppler-glib.cc + ) + poppler_add_test(test-poppler-glib BUILD_GTK_TESTS ${test_poppler_glib_SRCS}) + target_link_libraries(test-poppler-glib poppler-glib ${GDK2_LIBRARIES}) +endif (GDK_FOUND) diff --git a/glib/poppler-page.cc b/glib/poppler-page.cc index e3936012..5e0b2f10 100644 --- a/glib/poppler-page.cc +++ b/glib/poppler-page.cc @@ -375,7 +375,7 @@ poppler_page_set_selection_alpha (PopplerPage *page, } #endif /* POPPLER_WITH_GDK */ -#elif defined (HAVE_SPLASH) +#elif defined (HAVE_SPLASH) && defined (POPPLER_WITH_GDK) typedef struct { } OutputDevData; diff --git a/glib/test-poppler-glib.cc b/glib/test-poppler-glib.cc index 65d4516e..1e4f1cd5 100644 --- a/glib/test-poppler-glib.cc +++ b/glib/test-poppler-glib.cc @@ -2,8 +2,8 @@ #include <stdlib.h> #include <string.h> #include <time.h> -#include "poppler.h" #include "config.h" +#include "poppler.h" #define FAIL(msg) \ do { fprintf (stderr, "FAIL: %s\n", msg); exit (-1); } while (0) |