diff --git a/.appveyor.yml b/.appveyor.yml index 3596e82a3..69d6349d7 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,7 +9,7 @@ configuration: Release install: - git submodule update --init - cd dependencies - - download-dependencies.py discount fmilibrary qwt zeromq cppzmq msgpack-c katex tclap fmi4c + - download-dependencies.py discount fmilibrary qwt zeromq cppzmq msgpack-c katex tclap fmi4c xerces asio zlib libzip dcplib - cd .. build_script: # Remove sh.exe from PATH so that CMake works diff --git a/dependencies/libzip.pri b/dependencies/libzip.pri new file mode 100644 index 000000000..e8c4f8fee --- /dev/null +++ b/dependencies/libzip.pri @@ -0,0 +1,26 @@ +libzip_dir = $${PWD}/libzip +zlib_dir = $${PWD}/zlib +message(libzip_dir) +exists($${libzip_dir}) { + INCLUDEPATH *= $${libzip_dir}/include + LIBS *= -L$${libzip_dir}/bin -lzip + + macx { + # Not supported + } win32 { + src_file = $$quote($${libzip_dir}/bin/libzip.dll) + src_file_zlib = $$quote($${zlib_dir}/bin/libzlib.dll) + dst_dir = $$quote($${PWD}/../bin) + # Replace slashes in paths with backslashes for Windows + src_file ~= s,/,\\,g + src_file_zlib ~= s,/,\\,g + dst_dir ~= s,/,\\,g + + QMAKE_POST_LINK += $$QMAKE_COPY $${src_file} $${dst_dir} $$escape_expand(\\n\\t) + QMAKE_POST_LINK += $$QMAKE_COPY $${src_file_zlib} $${dst_dir} $$escape_expand(\\n\\t) + } else { + # Note! The RPATH is absolute and only meant for dev builds in the IDE, on release runtime paths should be stripped + unix:QMAKE_RPATHDIR *= $${libzip_dir/bin} + } +} + diff --git a/dependencies/xerces.pri b/dependencies/xerces.pri new file mode 100644 index 000000000..fc5e2b6f5 --- /dev/null +++ b/dependencies/xerces.pri @@ -0,0 +1,25 @@ +xerces_dir = $${PWD}/xerces + +exists($${xerces_dir}) { + INCLUDEPATH *= $${xerces_dir}/include + LIBS *= -L$${xerces_dir}/bin -lxerces-c + + macx { + # Not supported + } win32 { + src_file = $$quote($${xerces_dir}/bin/libxerces-c.dll) + dst_dir = $$quote($${PWD}/../bin) + # Replace slashes in paths with backslashes for Windows + src_file ~= s,/,\\,g + dst_dir ~= s,/,\\,g + + message($${src_file}) + message($${dst_dir}) + + QMAKE_POST_LINK += $$QMAKE_COPY $${src_file} $${dst_dir} $$escape_expand(\\n\\t) + } else { + # Note! The RPATH is absolute and only meant for dev builds in the IDE, on release runtime paths should be stripped + unix:QMAKE_RPATHDIR *= $${xerces_dir/bin} + } +} +