On Tuesday 05 of June 2012 09:38:35 Vipin Beniwal wrote:
> Hi ,
> 
> Please  tell me the way how can i build  poppler on windows statically  i
> have done it on mac successfully but on window i use cmake to build
> poppler which give me  shared dll .but i need static library so can i add
> them in my application .

What I see in CMakeLists.txt is:

if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
set(CMAKE_CXX_FLAGS "/Zc:wchar_t- ${CMAKE_CXX_FLAGS}")
add_library(poppler STATIC ${poppler_SRCS})
else(MSVC)
add_library(poppler SHARED ${poppler_SRCS})
endif(MSVC)


Which means, when MSVC compiler is used, static lib will be built by default, 
shared lib otherwise.
And if it happens that you use mingw, you can force it to make static libs 
yourself.
So.. what about removing code above from your CMakeLists.txt and just leave:

add_library(poppler STATIC ${poppler_SRCS})

Obviously you will need all poppler dependencies as static libs as well (but 
that's no longer in scope of poppler discussion).

-- 
regards
MM

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to