view OrthancFramework/SharedLibrary/NOTES.txt @ 4097:99e2054d1e8d

fix unit tests for orthanc framework
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 01 Jul 2020 11:15:29 +0200
parents cf454aabfc19
children c5efe8897da8
line wrap: on
line source



NB: CMake option "ORTHANC_INSTALL_DIR" can be used to specify an
installation directory (to be used with "ninja install").


Dynamic linking under Ubuntu 18.04
==================================

$ cd i
$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DALLOW_DOWNLOADS=ON \
           -DUSE_SYSTEM_CIVETWEB=OFF -DUSE_SYSTEM_GOOGLE_TEST=OFF -G Ninja
$ ninja -j4
$ ./UnitTests



Static linking under GNU/Linux
==============================

$ cd s
$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DSTATIC_BUILD=ON -G Ninja
$ ninja -j4
$ ./UnitTests



Cross-compilation to Windows 32 (using MinGW)
===============================

$ cd w32
$ cmake .. -DCMAKE_BUILD_TYPE=Release -DSTATIC_BUILD=ON -DUSE_LEGACY_LIBICU=ON -G Ninja \
        -DCMAKE_TOOLCHAIN_FILE=/home/jodogne/Subversion/orthanc/Resources/MinGW-W64-Toolchain32.cmake
$ ninja -j4

$ cp /usr/i686-w64-mingw32/lib/libwinpthread-1.dll .
$ cp /usr/lib/gcc/i686-w64-mingw32/7.3-win32/libgcc_s_sjlj-1.dll .
$ wine ./UnitTests.exe



WebAssembly (for the "upstream" version of emscripten)
===========

$ cd wasm
$ source ~/Downloads/emsdk/emsdk_env.sh
$ cmake .. -DCMAKE_BUILD_TYPE=Release -DALLOW_DOWNLOADS=ON -G Ninja \
        -DCMAKE_TOOLCHAIN_FILE=${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
$ ninja -j4