Update to openjpeg r2944
[pdfium.git] / core / src / fxcodec / fx_libopenjpeg / libopenjpeg20 / CMakeLists.txt
index fcf60ec..7f16834 100644 (file)
@@ -98,3 +98,13 @@ if(OPENJPEG_CPPCHECK)
       COMMAND ${CPPCHECK_EXECUTABLE} -DWIN32 ${f})
   endforeach()
 endif()
+
+if(OPJ_USE_DSYMUTIL)
+  if(BUILD_SHARED_LIBS)
+    GET_TARGET_PROPERTY(OPENJPEG_LIBRARY_LOCATION ${OPENJPEG_LIBRARY_NAME} LOCATION)
+    add_custom_command(TARGET ${OPENJPEG_LIBRARY_NAME} POST_BUILD
+    COMMAND "dsymutil" "${OPENJPEG_LIBRARY_LOCATION}"
+    COMMENT "dsymutil ${OPENJPEG_LIBRARY_LOCATION}"
+    DEPENDS ${OPENJPEG_LIBRARY_NAME})
+  endif()
+endif()