54 lines
1.2 KiB
CMake
54 lines
1.2 KiB
CMake
|
|
PROJECT(debian_PAPPSO NONE)
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
|
|
|
|
#FILE(GLOB SVG_FILES "${CMAKE_SOURCE_DIR}/images/*.svg")
|
|
|
|
FILE(GLOB SVG_FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/*.svg")
|
|
|
|
|
|
FOREACH(file ${SVG_FILES})
|
|
GET_FILENAME_COMPONENT(filename ${file} NAME_WE)
|
|
GET_FILENAME_COMPONENT(filepath ${file} PATH)
|
|
#inkscape --without-gui --export-pdf="${f%.svg}.pdf" $f
|
|
ADD_CUSTOM_COMMAND (
|
|
#COMMENT ("inkscape ${file} to pdf")
|
|
OUTPUT ${filepath}/${filename}.pdf
|
|
DEPENDS ${filepath}/${filename}.svg
|
|
COMMAND inkscape
|
|
ARGS --without-gui --export-pdf="${filepath}/${filename}.pdf" ${filepath}/${filename}.svg
|
|
)
|
|
SET (PDF_RESULTS ${PDF_RESULTS}
|
|
${filepath}/${filename}.pdf
|
|
)
|
|
ENDFOREACH(file)
|
|
|
|
|
|
|
|
ADD_CUSTOM_TARGET(svg2pdf
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/images
|
|
COMMENT "Converting SVG files..."
|
|
DEPENDS ${PDF_RESULTS}
|
|
)
|
|
|
|
|
|
SET(LATEX_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build)
|
|
|
|
INCLUDE(UseLATEX.cmake)
|
|
|
|
ADD_LATEX_DOCUMENT (
|
|
recherche_bien_commun.tex
|
|
INPUTS recherche_bien_commun.tex slashbox.sty
|
|
IMAGE_DIRS images
|
|
DEFAULT_PDF
|
|
DEPENDS svg2pdf
|
|
)
|
|
|
|
ADD_CUSTOM_TARGET(view
|
|
COMMAND evince recherche_bien_commun.pdf
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/build
|
|
COMMENT "Viewing pdf..."
|
|
)
|