[poppler] 2 commits - CMakeLists.txt

Pino Toscano pino at kemper.freedesktop.org
Fri Oct 9 07:21:48 PDT 2009


 CMakeLists.txt |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c3031b4318af6f85256f2478c8678dedd0d6acd1
Author: Pino Toscano <pino at kde.org>
Date:   Fri Oct 9 16:17:16 2009 +0200

    cmake: simplify the linking to libpng

diff --git a/CMakeLists.txt b/CMakeLists.txt
index cc23c63..3348711 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -262,6 +262,9 @@ if(WIN32)
   # gdi32 is needed under win32
   set(poppler_LIBS ${poppler_LIBS} gdi32)
 endif(WIN32)
+if(PNG_FOUND)
+  set(poppler_LIBS ${poppler_LIBS} ${PNG_LIBRARIES})
+endif(PNG_FOUND)
 
 if(MSVC)
 add_definitions(-D_CRT_SECURE_NO_WARNINGS)
@@ -271,11 +274,7 @@ else(MSVC)
 add_library(poppler SHARED ${poppler_SRCS})
 endif(MSVC)
 set_target_properties(poppler PROPERTIES VERSION 5.0.0 SOVERSION 5)
-if (ENABLE_LIBPNG)
-target_link_libraries(poppler ${poppler_LIBS} ${PNG_LIBRARIES})
-else (ENABLE_LIBPNG)
 target_link_libraries(poppler ${poppler_LIBS})
-endif (ENABLE_LIBPNG)
 install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
 
 if(ENABLE_XPDF_HEADERS)
commit 96688dd7a091f8fa141fad2b3d05bae04b0b86fb
Author: Patrick Spendrin <ps_ml at gmx.de>
Date:   Fri Oct 9 16:09:46 2009 +0200

    MSVC: add _CRT_SECURE_NO_WARNINGS to the define's

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 10218fc..cc23c63 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -264,6 +264,7 @@ if(WIN32)
 endif(WIN32)
 
 if(MSVC)
+add_definitions(-D_CRT_SECURE_NO_WARNINGS)
 set(poppler_SRCS ${poppler_SRCS} poppler/GlobalParamsWin.cc)
 add_library(poppler STATIC ${poppler_SRCS})
 else(MSVC)


More information about the poppler mailing list