1
votes

I try build xlnt library from rep

https://github.com/tfussell/xlnt on Windows x64 using cmake: cmake -G "MinGW Makefiles"

and get errors:

CMake Error at cmake/xlnt.cmake:70 (add_library): Cannot find source file:

../third-party/miniz/miniz.c

Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx Call Stack (most recent call first): CMakeLists.txt:74 (include)

CMake Error: CMake can not determine linker language for target: xlnt.shared CMake Error: Cannot determine link language for target "xlnt.shared".

I am beginner in cmanke, but in directory nessessry file containts:

xlnt\third-party\miniz.c

What can I do for desition this building problem? Thanks for answer

Issue on github: https://github.com/tfussell/xlnt/issues/57

1

1 Answers

4
votes

I sucessfly compile the library:

TODO:

  1. Edit "cmake/xlnt.cmake": change path form../ to./

SET(MINIZ ./third-party/miniz/miniz.c ./third-party/miniz/miniz.h)

SET(PUGIXML ./third-party/pugixml/src/pugixml.hpp ./third-party/pugixml/src/pugixml.cpp ./third-party/pugixml/src/pugiconfig.hpp)

I think that is path-bug. I issued in project about it.

  1. cmake -G "NMake Makefiles" - .configure for VS compiler
  2. nmake - compile by VS compiler