Mercurial > hg > orthanc-python
changeset 279:66768d476400
support of -DUSE_SYSTEM_ORTHANC_SDK=ON in cmake
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 12 Aug 2025 16:54:57 +0200 |
parents | 02077e32cd70 |
children | 1f9a6ecb2e90 |
files | CMakeLists.txt CodeAnalysis/GenerateOrthancSDK.py |
diffstat | 2 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Tue Aug 12 16:17:57 2025 +0200 +++ b/CMakeLists.txt Tue Aug 12 16:54:57 2025 +0200 @@ -230,7 +230,12 @@ endif() else() - message(FATAL_ERROR "Not implemented") + find_path(ORTHANC_SDK_SYSTEM_DIR OrthancCPlugin.h + /usr/ + /usr/local/ + PATH_SUFFIXES include/orthanc + ) + set(ORTHANC_SDK ${ORTHANC_SDK_SYSTEM_DIR}/OrthancCPlugin.h) endif() @@ -318,7 +323,8 @@ ${JSONCPP_SOURCES} ) -if (CMAKE_COMPILER_IS_GNUCXX) +if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR + CMAKE_CXX_COMPILER_ID STREQUAL "GNU") # Don't report warnings about deprecated functions in the Orthanc SDK set_source_files_properties( ${AUTOGENERATED_DIR}/sdk/sdk.cpp
--- a/CodeAnalysis/GenerateOrthancSDK.py Tue Aug 12 16:17:57 2025 +0200 +++ b/CodeAnalysis/GenerateOrthancSDK.py Tue Aug 12 16:54:57 2025 +0200 @@ -39,7 +39,7 @@ ## with open(os.path.join(ROOT, '..', 'CMakeLists.txt'), 'r') as f: - m = re.findall('^set\(ORTHANC_SDK_DEFAULT_VERSION "([^"]+)"\)$', f.read(), re.MULTILINE) + m = re.findall(r'^set\(ORTHANC_SDK_DEFAULT_VERSION "([^"]+)"\)$', f.read(), re.MULTILINE) assert(len(m) == 1) ORTHANC_SDK_DEFAULT_VERSION = m[0]