El dilluns, 4 de setembre de 2017, a les 13:43:10 CEST, William Bader va
escriure:
> I mainly use the poppler pdftops utility, and with autotools, I have been
> using --enable-static --disable-shared so that I have a single executable
> instead of an executable and library. Is there an equivalent with cmake?
> Adding -DBUILD_SHARED_LIBS=OFF didn't seem to make any different. Thanks,
> William
I'm not really very happy supporting static builds but sine this seems to be a
small change, can you verify this patch works for you?
Cheers,
Albert
diff --git a/CMakeLists.txt b/CMakeLists.txt
index defb215f..5bf8dac1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,6 +47,7 @@ option(ENABLE_ZLIB_UNCOMPRESS "Use zlib to uncompress flate streams (not totally
option(SPLASH_CMYK "Include support for CMYK rasterization." OFF)
option(USE_FIXEDPOINT "Use fixed point arithmetic in the Splash backend" OFF)
option(USE_FLOAT "Use single precision arithmetic in the Splash backend" OFF)
+option(BUILD_SHARED_LIBS "Build the shared library" ON)
if(WIN32)
option(ENABLE_RELOCATABLE "Do not hardcode the poppler library location (on Windows)." ON)
else()
@@ -535,7 +536,7 @@ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
set(CMAKE_CXX_FLAGS "/Zc:wchar_t- ${CMAKE_CXX_FLAGS}")
add_library(poppler STATIC ${poppler_SRCS})
else()
-add_library(poppler SHARED ${poppler_SRCS})
+add_library(poppler ${poppler_SRCS})
endif()
set_target_properties(poppler PROPERTIES VERSION 70.0.0 SOVERSION 70)
target_link_libraries(poppler LINK_PRIVATE ${poppler_LIBS})
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler