Skip to content

Commit 3eccf47

Browse files
committed
build and install library
1 parent 3cbc66a commit 3eccf47

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

pdf2htmlEX/CMakeLists.txt

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ configure_file (${CMAKE_SOURCE_DIR}/share/pdf2htmlEX.js.in ${CMAKE_SOURCE_DIR}/s
108108

109109
set(PDF2HTMLEX_SRC ${PDF2HTMLEX_SRC}
110110
src/Param.h
111-
src/pdf2htmlEX.cc
112111
src/pdf2htmlEX-config.h
113112
src/HTMLRenderer/HTMLRenderer.h
114113
src/HTMLRenderer/draw.cc
@@ -169,8 +168,12 @@ set(PDF2HTMLEX_SRC ${PDF2HTMLEX_SRC}
169168
src/TmpFiles.cc
170169
)
171170

172-
add_executable(pdf2htmlEX ${PDF2HTMLEX_SRC})
173-
target_link_libraries(pdf2htmlEX ${PDF2HTMLEX_LIBS})
171+
add_library(libpdf2htmlEX ${PDF2HTMLEX_SRC})
172+
target_link_libraries(libpdf2htmlEX ${PDF2HTMLEX_LIBS})
173+
set_target_properties(libpdf2htmlEX PROPERTIES OUTPUT_NAME pdf2htmlEX)
174+
175+
add_executable(pdf2htmlEX src/pdf2htmlEX.cc)
176+
target_link_libraries(pdf2htmlEX libpdf2htmlEX)
174177

175178
add_custom_target(pdf2htmlEX_resources ALL DEPENDS
176179
${CMAKE_SOURCE_DIR}/share/base.min.css
@@ -195,6 +198,16 @@ add_custom_command(OUTPUT
195198
${CMAKE_SOURCE_DIR}/share/fancy.css
196199
)
197200

201+
install (TARGETS libpdf2htmlEX
202+
LIBRARY DESTINATION lib
203+
ARCHIVE DESTINATION lib
204+
)
205+
install (
206+
DIRECTORY pdf2htmlEX/src/
207+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
208+
FILES_MATCHING PATTERN "*.h"
209+
)
210+
198211
install (TARGETS pdf2htmlEX DESTINATION bin)
199212

200213
set(PDF2HTMLEX_RESOURCE

0 commit comments

Comments
 (0)