[poppler] CMakeLists.txt glib/CMakeLists.txt
Albert Astals Cid
aacid at kemper.freedesktop.org
Sun Jan 24 11:19:14 PST 2010
CMakeLists.txt | 4 ++--
glib/CMakeLists.txt | 25 +++++++------------------
2 files changed, 9 insertions(+), 20 deletions(-)
New commits:
commit 38467f2738c88f060ae1d30332e34da743a888a5
Author: Albert Astals Cid <aacid at kde.org>
Date: Sun Jan 24 19:18:44 2010 +0000
only compile glib frontend if cairo is found
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0cd32df..5986611 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -415,9 +415,9 @@ endif(ENABLE_XPDF_HEADERS)
if(ENABLE_UTILS)
add_subdirectory(utils)
endif(ENABLE_UTILS)
-if(GLIB_FOUND)
+if(GLIB_FOUND AND CAIRO_FOUND)
add_subdirectory(glib)
-endif(GLIB_FOUND)
+endif(GLIB_FOUND AND CAIRO_FOUND)
if(QT3_FOUND)
add_subdirectory(qt)
endif(QT3_FOUND)
diff --git a/glib/CMakeLists.txt b/glib/CMakeLists.txt
index ceef25e..28cc1ab 100644
--- a/glib/CMakeLists.txt
+++ b/glib/CMakeLists.txt
@@ -4,13 +4,9 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
-if (CAIRO_FOUND)
- include_directories(${CAIRO_INCLUDES})
- set (CAIRO_FEATURE "#define POPPLER_HAS_CAIRO 1")
- add_definitions(${CAIRO_CFLAGS})
-else (CAIRO_FOUND)
- set (CAIRO_FEATURE "#undef POPPLER_HAS_CAIRO")
-endif (CAIRO_FOUND)
+include_directories(${CAIRO_INCLUDES})
+set (CAIRO_FEATURE "#define POPPLER_HAS_CAIRO 1")
+add_definitions(${CAIRO_CFLAGS})
if (GDK_FOUND)
add_definitions(${GDK2_CFLAGS})
@@ -85,20 +81,13 @@ set(poppler_glib_SRCS
poppler-layer.cc
poppler.cc
${CMAKE_CURRENT_BINARY_DIR}/poppler-enums.c
+ ${CMAKE_SOURCE_DIR}/poppler/CairoFontEngine.cc
+ ${CMAKE_SOURCE_DIR}/poppler/CairoOutputDev.cc
+ ${CMAKE_SOURCE_DIR}/poppler/CairoRescaleBox.cc
)
-if (CAIRO_FOUND)
- set(poppler_glib_SRCS ${poppler_glib_SRCS}
- ${CMAKE_SOURCE_DIR}/poppler/CairoFontEngine.cc
- ${CMAKE_SOURCE_DIR}/poppler/CairoOutputDev.cc
- ${CMAKE_SOURCE_DIR}/poppler/CairoRescaleBox.cc
- )
-endif (CAIRO_FOUND)
add_library(poppler-glib SHARED ${poppler_glib_SRCS})
set_target_properties(poppler-glib PROPERTIES VERSION 4.0.0 SOVERSION 4)
-target_link_libraries(poppler-glib poppler ${GLIB2_LIBRARIES})
-if (CAIRO_FOUND)
- target_link_libraries(poppler-glib ${CAIRO_LIBRARIES})
-endif (CAIRO_FOUND)
+target_link_libraries(poppler-glib poppler ${GLIB2_LIBRARIES} ${CAIRO_LIBRARIES})
install(TARGETS poppler-glib RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
install(FILES
More information about the poppler
mailing list