cmake-pandocology
cmake-pandocology copied to clipboard
Could not get pandocology to work on Windows 10
Directory structure
├───LaTeX
│ ├───build
│ │ └───CMakeFiles
│ │ ├───3.2.2
│ │ ├───Progress
│ │ └───test.tex.dir
│ ├───cmake
│ │ └───Modules
│ │ └───cmake-pandocology
│ └───Sections
└───Markdown
- CMakeLists.txt
- changed to
LaTeX\buildand issued the following command:cmake -G "MinGW Makefiles" .."c:\Program Files (x86)\GnuWin32\bin\make.exe"
Received the following error messages:
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/[...]/LaTeX/build
make[2]: Zirkuläre Datei CMakeFiles/test.tex <- test.tex Abhängigkeit wird nicht verwendet.
[ 33%] Generating product/test.tex
Error copying file "test.tex" to "C:/Users/[...]/LaTeX/build/product".
make[2]: *** [product/test.tex] Fehler 1
make[1]: *** [CMakeFiles/test.tex.dir/all] Fehler 2
make: *** [all] Fehler 2
Similar error for c:\MinGW\bin\mingw32-make.exe
Any idea what went wrong?
Are there spaces anywhere in the path? If so, could you try an experiment to see if it will work if there are no spaces anywhere in the path?
There are no spaces in the [...] portion of the path. There is only a space in c:\Program Files (x86) for the GunWin32 call, but not in MinGW, so it should not have an influence.
To ease the investigation I created a repo containing the necessary files to reproduce the error.
@jeetsukumaran Could you please further investigate? Maybe my CMakeLists.txt is not correct. I am especially irritated by the circular file dependency report which i do not understand.
I had a look at the attached repo. The directory organization is incorrect.
You want something like this:
.
├── CMakeLists.txt
├── README.md
├── cmake
│ └── Modules
│ └── cmake-pandocology
│ ├── README.md
│ └── pandocology.cmake
└── src
├── CMakeLists.txt
└── test.md
With the top-level CMakeLists.txt:
##############################################################################
## Required CMake
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
##############################################################################
## Find local CMake modules
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules")
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules/cmake-pandocology")
##############################################################################
## Block builds from project directory
# INCLUDE(DisableInSourceBuild)
##############################################################################
## Project name
PROJECT("paper" NONE)
##############################################################################
## Sources
SET(LATEX_OUTPUT_PATH ${CMAKE_BINARY_DIR})
ADD_SUBDIRECTORY(src)
And src/CMakeLists.txt:
INCLUDE(pandocology)
add_document(
test.tex
SOURCES test.md
PANDOC_DIRECTIVES -f markdown_github -t latex
)
Working example here: pd-example1.tar.gz
To build, follow instructions in README.
Many thanks! I wil take a look at it.
Please close resolved issues.
On Windows there seems to be an unresolved dependency on https://github.com/CDSoft/pp Is this appropriate?