view OrthancFramework/SharedLibrary/NOTES.txt @ 5221:d0f7c742d397 db-protobuf

started implementation of labels
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 03 Apr 2023 20:53:14 +0200
parents fcbac3e8ac1c
children
line wrap: on
line source



NB: CMake option "ORTHANC_INSTALL_PREFIX" can be used to specify an
installation directory (to be used with "make install" or "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



Linux Standard Base
===================

$ cd lsb
$ LSB_CC=gcc-4.8 LSB_CXX=g++-4.8 cmake /home/jodogne/Subversion/orthanc/OrthancFramework/SharedLibrary -G Ninja \
  -DCMAKE_TOOLCHAIN_FILE=/home/jodogne/Subversion/orthanc/OrthancFramework/Resources/Toolchains/LinuxStandardBaseToolchain.cmake \
  -DCMAKE_BUILD_TYPE=Release -DSTATIC_BUILD=ON
$ ninja -j4


!! For some reason, the linking step works on Ubuntu 16.04, but *not*
   on Ubuntu 18.04. It looks as it the symbols from the C++ standard
   were missing.



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