[trunk] fixed a buffer overflow in opj_tcd_init_decode_tile
[openjpeg.git] / src / lib / openjp2 / CMakeLists.txt
index a63598904350c36bcac2fcb3a072489d4ff98aaa..5727068c2b44dcf8825cfdcc700f94dfa6defc54 100644 (file)
@@ -5,7 +5,7 @@ install( FILES  ${CMAKE_CURRENT_BINARY_DIR}/opj_config.h
  DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers)
 
 include_directories(
-  ${OPENJPEG_BINARY_DIR}/src/lib/openjp2 # opj_config.h
+  ${OPENJPEG_BINARY_DIR}/src/lib/openjp2 # opj_config.h and opj_config_private.h
 )
 # Defines the source code for the library
 set(OPENJPEG_SRCS
@@ -68,10 +68,12 @@ install(FILES openjpeg.h opj_stdint.h
   DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers
 )
 
+if(BUILD_DOC)
 # install man page of the library
 install(
   FILES       ${OPENJPEG_SOURCE_DIR}/doc/man/man3/libopenjp2.3
   DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man3)
+endif()
 
 # internal utilities to generate t1_luts.h (part of the jp2 lib)
 # no need to install:
@@ -96,3 +98,12 @@ if(OPENJPEG_CPPCHECK)
       COMMAND ${CPPCHECK_EXECUTABLE} -DWIN32 ${f})
   endforeach()
 endif()
+
+if(OPJ_USE_DSYMUTIL)
+  if(BUILD_SHARED_LIBS)
+    add_custom_command(TARGET ${OPENJPEG_LIBRARY_NAME} POST_BUILD 
+    COMMAND "dsymutil" "$<TARGET_SONAME_FILE:${OPENJPEG_LIBRARY_NAME}>"
+    COMMENT "dsymutil $<TARGET_SONAME_FILE:${OPENJPEG_LIBRARY_NAME}>"
+    DEPENDS ${OPENJPEG_LIBRARY_NAME})
+  endif()
+endif()