[trunk] Add option to call dsymutil on built binaries (fixes issue 409)
This commit is contained in:
parent
f8796711e8
commit
984351f86f
|
@ -148,6 +148,7 @@ endif()
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${OPENJPEG_INSTALL_LIB_DIR}")
|
list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${OPENJPEG_INSTALL_LIB_DIR}")
|
||||||
|
option(OPJ_USE_DSYMUTIL "Call dsymutil on binaries after build." OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -50,6 +50,13 @@ foreach(exe opj_decompress opj_compress opj_dump)
|
||||||
EXPORT OpenJPEGTargets
|
EXPORT OpenJPEGTargets
|
||||||
DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
||||||
)
|
)
|
||||||
|
if(OPJ_USE_DSYMUTIL)
|
||||||
|
GET_TARGET_PROPERTY(EXE_LOCATION ${exe} LOCATION)
|
||||||
|
add_custom_command(TARGET ${exe} POST_BUILD
|
||||||
|
COMMAND "dsymutil" "${EXE_LOCATION}"
|
||||||
|
COMMENT "dsymutil ${EXE_LOCATION}"
|
||||||
|
DEPENDS ${exe})
|
||||||
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if(BUILD_DOC)
|
if(BUILD_DOC)
|
||||||
|
|
|
@ -98,3 +98,13 @@ if(OPENJPEG_CPPCHECK)
|
||||||
COMMAND ${CPPCHECK_EXECUTABLE} -DWIN32 ${f})
|
COMMAND ${CPPCHECK_EXECUTABLE} -DWIN32 ${f})
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
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()
|
||||||
|
|
Loading…
Reference in New Issue