Mercurial > hg > orthanc-authorization
changeset 147:ad189440edcf
merge
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 13 Feb 2024 11:24:25 +0100 |
parents | f294a3c6dbe6 (current diff) 9a9be09b9a30 (diff) |
children | 20c638fa8b07 |
files | |
diffstat | 6 files changed, 8 insertions(+), 216 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Tue Feb 13 11:24:07 2024 +0100 +++ b/CMakeLists.txt Tue Feb 13 11:24:25 2024 +0100 @@ -170,7 +170,9 @@ ${PLUGIN_SOURCES} ) -DefineSourceBasenameForTarget(OrthancAuthorization) +if (COMMAND DefineSourceBasenameForTarget) + DefineSourceBasenameForTarget(OrthancAuthorization) +endif() add_dependencies(OrthancAuthorization AutogeneratedTarget)
--- a/Resources/Orthanc/CMake/Compiler.cmake Tue Feb 13 11:24:07 2024 +0100 +++ b/Resources/Orthanc/CMake/Compiler.cmake Tue Feb 13 11:24:25 2024 +0100 @@ -124,12 +124,15 @@ ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") - if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" AND + if (# NOT ${CMAKE_SYSTEM_VERSION} STREQUAL "LinuxStandardBase" AND + NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") # The "--no-undefined" linker flag makes the shared libraries # (plugins ModalityWorklists and ServeFolders) fail to compile on # OpenBSD, and make the PostgreSQL plugin complain about missing - # "environ" global variable in FreeBSD + # "environ" global variable in FreeBSD. Furthermore, on Linux + # Standard Base running on Debian 12, the "-Wl,--no-undefined" + # breaks the compilation (added after Orthanc 1.12.2). set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") endif()
--- a/Resources/Orthanc/LinuxStandardBaseToolchain.cmake Tue Feb 13 11:24:07 2024 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ -# Orthanc - A Lightweight, RESTful DICOM Store -# Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics -# Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2023 Osimis S.A., Belgium -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation, either version 3 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/>. - - -# -# Full build, as used on the BuildBot CIS: -# -# $ LSB_CC=gcc-4.8 LSB_CXX=g++-4.8 cmake ../OrthancServer/ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=../OrthancFramework/Resources/Toolchains/LinuxStandardBaseToolchain.cmake -DUSE_LEGACY_JSONCPP=ON -DUSE_LEGACY_LIBICU=ON -DBOOST_LOCALE_BACKEND=icu -DENABLE_PKCS11=ON -G Ninja -# -# Or, more lightweight version (without libp11 and ICU): -# -# $ LSB_CC=gcc-4.8 LSB_CXX=g++-4.8 cmake ../OrthancServer/ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=../OrthancFramework/Resources/Toolchains/LinuxStandardBaseToolchain.cmake -DUSE_LEGACY_JSONCPP=ON -G Ninja -# - -INCLUDE(CMakeForceCompiler) - -SET(LSB_PATH $ENV{LSB_PATH} CACHE STRING "") -SET(LSB_CC $ENV{LSB_CC} CACHE STRING "") -SET(LSB_CXX $ENV{LSB_CXX} CACHE STRING "") -SET(LSB_TARGET_VERSION "4.0" CACHE STRING "") - -IF ("${LSB_PATH}" STREQUAL "") - SET(LSB_PATH "/opt/lsb") -ENDIF() - -IF (EXISTS ${LSB_PATH}/lib64) - SET(LSB_TARGET_PROCESSOR "x86_64") - SET(LSB_LIBPATH ${LSB_PATH}/lib64-${LSB_TARGET_VERSION}) -ELSEIF (EXISTS ${LSB_PATH}/lib) - SET(LSB_TARGET_PROCESSOR "x86") - SET(LSB_LIBPATH ${LSB_PATH}/lib-${LSB_TARGET_VERSION}) -ELSE() - MESSAGE(FATAL_ERROR "Unable to detect the target processor architecture. Check the LSB_PATH environment variable.") -ENDIF() - -SET(LSB_CPPPATH ${LSB_PATH}/include) -SET(PKG_CONFIG_PATH ${LSB_LIBPATH}/pkgconfig/) - -# the name of the target operating system -SET(CMAKE_SYSTEM_NAME Linux) -SET(CMAKE_SYSTEM_VERSION LinuxStandardBase) -SET(CMAKE_SYSTEM_PROCESSOR ${LSB_TARGET_PROCESSOR}) - -# which compilers to use for C and C++ -SET(CMAKE_C_COMPILER ${LSB_PATH}/bin/lsbcc) - -if (${CMAKE_VERSION} VERSION_LESS "3.6.0") - CMAKE_FORCE_CXX_COMPILER(${LSB_PATH}/bin/lsbc++ GNU) -else() - SET(CMAKE_CXX_COMPILER ${LSB_PATH}/bin/lsbc++) -endif() - -# here is the target environment located -SET(CMAKE_FIND_ROOT_PATH ${LSB_PATH}) - -# adjust the default behaviour of the FIND_XXX() commands: -# search headers and libraries in the target environment, search -# programs in the host environment -SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER) -SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) - -SET(CMAKE_CROSSCOMPILING OFF) - - -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --lsb-target-version=${LSB_TARGET_VERSION} -I${LSB_PATH}/include" CACHE INTERNAL "" FORCE) -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --lsb-target-version=${LSB_TARGET_VERSION} -nostdinc++ -I${LSB_PATH}/include -I${LSB_PATH}/include/c++ -I${LSB_PATH}/include/c++/backward" CACHE INTERNAL "" FORCE) -SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --lsb-target-version=${LSB_TARGET_VERSION} -L${LSB_LIBPATH} --lsb-besteffort" CACHE INTERNAL "" FORCE) -SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --lsb-target-version=${LSB_TARGET_VERSION} -L${LSB_LIBPATH} --lsb-besteffort" CACHE INTERNAL "" FORCE) - -if (NOT "${LSB_CXX}" STREQUAL "") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --lsb-cxx=${LSB_CXX}") - SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --lsb-cxx=${LSB_CXX}") - SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --lsb-cxx=${LSB_CXX}") -endif() - -if (NOT "${LSB_CC}" STREQUAL "") - SET(CMAKE_C_FLAGS "${CMAKE_CC_FLAGS} --lsb-cc=${LSB_CC}") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --lsb-cc=${LSB_CC}") - SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --lsb-cc=${LSB_CC}") - SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --lsb-cc=${LSB_CC}") -endif() -
--- a/Resources/Orthanc/MinGW-W64-Toolchain32.cmake Tue Feb 13 11:24:07 2024 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -# Orthanc - A Lightweight, RESTful DICOM Store -# Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics -# Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2023 Osimis S.A., Belgium -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation, either version 3 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/>. - - -# the name of the target operating system -set(CMAKE_SYSTEM_NAME Windows) - -# which compilers to use for C and C++ -set(CMAKE_C_COMPILER i686-w64-mingw32-gcc) -set(CMAKE_CXX_COMPILER i686-w64-mingw32-g++) -set(CMAKE_RC_COMPILER i686-w64-mingw32-windres) - -# here is the target environment located -set(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32) - -# adjust the default behaviour of the FIND_XXX() commands: -# search headers and libraries in the target environment, search -# programs in the host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
--- a/Resources/Orthanc/MinGW-W64-Toolchain64.cmake Tue Feb 13 11:24:07 2024 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -# Orthanc - A Lightweight, RESTful DICOM Store -# Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics -# Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2023 Osimis S.A., Belgium -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation, either version 3 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/>. - - -# the name of the target operating system -set(CMAKE_SYSTEM_NAME Windows) - -# which compilers to use for C and C++ -set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) -set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++) -set(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres) - -# here is the target environment located -set(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32) - -# adjust the default behaviour of the FIND_XXX() commands: -# search headers and libraries in the target environment, search -# programs in the host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
--- a/Resources/Orthanc/MinGWToolchain.cmake Tue Feb 13 11:24:07 2024 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -# Orthanc - A Lightweight, RESTful DICOM Store -# Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics -# Department, University Hospital of Liege, Belgium -# Copyright (C) 2017-2023 Osimis S.A., Belgium -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public License -# as published by the Free Software Foundation, either version 3 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/>. - - -# the name of the target operating system -set(CMAKE_SYSTEM_NAME Windows) - -# which compilers to use for C and C++ -set(CMAKE_C_COMPILER i586-mingw32msvc-gcc) -set(CMAKE_CXX_COMPILER i586-mingw32msvc-g++) -set(CMAKE_RC_COMPILER i586-mingw32msvc-windres) - -# here is the target environment located -set(CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc) - -# adjust the default behaviour of the FIND_XXX() commands: -# search headers and libraries in the target environment, search -# programs in the host environment -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) - -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSTACK_SIZE_PARAM_IS_A_RESERVATION=0x10000" CACHE INTERNAL "" FORCE) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTACK_SIZE_PARAM_IS_A_RESERVATION=0x10000" CACHE INTERNAL "" FORCE)