cmake-pandocology icon indicating copy to clipboard operation
cmake-pandocology copied to clipboard

Could not get pandocology to work on Windows 10

Open daixtrose opened this issue 8 years ago • 7 comments

Directory structure

├───LaTeX
│   ├───build
│   │   └───CMakeFiles
│   │       ├───3.2.2
│   │       ├───Progress
│   │       └───test.tex.dir
│   ├───cmake
│   │   └───Modules
│   │       └───cmake-pandocology
│   └───Sections
└───Markdown
  • CMakeLists.txt
  • changed to LaTeX\build and 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?

daixtrose avatar Jun 06 '16 21:06 daixtrose

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?

jeetsukumaran avatar Jun 06 '16 21:06 jeetsukumaran

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.

daixtrose avatar Jun 07 '16 07:06 daixtrose

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.

daixtrose avatar Jun 07 '16 09:06 daixtrose

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.

jeetsukumaran avatar Jun 07 '16 19:06 jeetsukumaran

Many thanks! I wil take a look at it.

daixtrose avatar Jun 08 '16 16:06 daixtrose

Please close resolved issues.

KUGA2 avatar Jun 08 '20 09:06 KUGA2

On Windows there seems to be an unresolved dependency on https://github.com/CDSoft/pp Is this appropriate?

phreed avatar Mar 22 '22 23:03 phreed