Bug #785

It should be possible to override the library paths and names of the external libraries when using CMake on Windows

Added by Marco Eichelberg 3 months ago.

Status:New Start date:2017-07-25
Priority:Normal Due date:
Assignee:- % Done:


Target version:-
Module: Compiler:
Operating System:


Dan Hosseinzadeh writes:

Presently, there a number of assumptions in the CMake scripts regarding the filename convention of libraries and location of include directories for 3rd party packages. For instance, the /libxml /support specifies the following (see "3rdparty.cmake"):

    SET(LIBXML_LIBS debug ${LIBXML_LIBDIR}/libxml2_d.lib optimized ${LIBXML_LIBDIR}/libxml2_o.lib debug ${LIBXML_LIBDIR}/iconv_d.lib optimized


These assumptions will not work in many cases and as such it would be more portable to rely on user provided variables like LIBXML_LIBRARIES and LIBXML_INCLUDE_DIRS. Something like this:



This method is more flexible and the typical pattern used by CMake's FIND_PACKAGE methods. This applies to all of the 3rd party dependencies.

The hard-coded library names and paths are adjusted to the external libraries as compiled in the nightly build and offered for download.
However, it should be possible to override these defaults by user-specific values, without modifying the CMake build files, which is currently not the case.

Also available in: Atom PDF