# HG changeset patch # User Sebastien Jodogne # Date 1755010497 -7200 # Node ID 66768d4764009d940dba3d3b9dd20b3f5c78a6c3 # Parent 02077e32cd70ffcf3f4e52fb6f6c158e96f682d7 support of -DUSE_SYSTEM_ORTHANC_SDK=ON in cmake diff -r 02077e32cd70 -r 66768d476400 CMakeLists.txt --- 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 diff -r 02077e32cd70 -r 66768d476400 CodeAnalysis/GenerateOrthancSDK.py --- 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]