diff CMakeLists.txt @ 171:c8de83fe7faa

removed deprecation warnings
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 27 Jun 2024 15:52:51 +0200
parents fcce093788a8
children ddf3e987827f
line wrap: on
line diff
--- a/CMakeLists.txt	Thu Jun 27 14:26:59 2024 +0200
+++ b/CMakeLists.txt	Thu Jun 27 15:52:51 2024 +0200
@@ -196,6 +196,13 @@
   ${WINDOWS_RESOURCES}
   )
 
+if (CMAKE_COMPILER_IS_GNUCXX)
+  # Don't report warnings about deprecated functions in the Orthanc SDK
+  set_source_files_properties(
+    Sources/Autogenerated/sdk.cpp
+    PROPERTIES COMPILE_FLAGS -Wno-deprecated-declarations)
+endif()
+
 target_link_libraries(OrthancPython ${PYTHON_LIBRARIES})
 
 add_definitions(
@@ -213,3 +220,7 @@
   RUNTIME DESTINATION lib    # Destination for Windows
   LIBRARY DESTINATION share/orthanc/plugins    # Destination for Linux
   )
+
+if (COMMAND DefineSourceBasenameForTarget)
+  DefineSourceBasenameForTarget(OrthancPython)
+endif()