Skip to content

Commit

Permalink
build and install library
Browse files Browse the repository at this point in the history
  • Loading branch information
andiwand committed Jan 1, 2025
1 parent 3cbc66a commit 3eccf47
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions pdf2htmlEX/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ configure_file (${CMAKE_SOURCE_DIR}/share/pdf2htmlEX.js.in ${CMAKE_SOURCE_DIR}/s

set(PDF2HTMLEX_SRC ${PDF2HTMLEX_SRC}
src/Param.h
src/pdf2htmlEX.cc
src/pdf2htmlEX-config.h
src/HTMLRenderer/HTMLRenderer.h
src/HTMLRenderer/draw.cc
Expand Down Expand Up @@ -169,8 +168,12 @@ set(PDF2HTMLEX_SRC ${PDF2HTMLEX_SRC}
src/TmpFiles.cc
)

add_executable(pdf2htmlEX ${PDF2HTMLEX_SRC})
target_link_libraries(pdf2htmlEX ${PDF2HTMLEX_LIBS})
add_library(libpdf2htmlEX ${PDF2HTMLEX_SRC})
target_link_libraries(libpdf2htmlEX ${PDF2HTMLEX_LIBS})
set_target_properties(libpdf2htmlEX PROPERTIES OUTPUT_NAME pdf2htmlEX)

add_executable(pdf2htmlEX src/pdf2htmlEX.cc)
target_link_libraries(pdf2htmlEX libpdf2htmlEX)

add_custom_target(pdf2htmlEX_resources ALL DEPENDS
${CMAKE_SOURCE_DIR}/share/base.min.css
Expand All @@ -195,6 +198,16 @@ add_custom_command(OUTPUT
${CMAKE_SOURCE_DIR}/share/fancy.css
)

install (TARGETS libpdf2htmlEX
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
install (
DIRECTORY pdf2htmlEX/src/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.h"
)

install (TARGETS pdf2htmlEX DESTINATION bin)

set(PDF2HTMLEX_RESOURCE
Expand Down

0 comments on commit 3eccf47

Please sign in to comment.