From 8d18c77a7d62448599e0888a5dced94f84f0f89f Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Wed, 11 Jan 2012 13:54:11 +0000 Subject: [PATCH] Add the fno-common flag to work around an issue with ld: common symbols not allowed with MH_DYLIB output format with the -multi_module option --- libopenjpeg/jpwl/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libopenjpeg/jpwl/CMakeLists.txt b/libopenjpeg/jpwl/CMakeLists.txt index 52411779..6fcfc957 100644 --- a/libopenjpeg/jpwl/CMakeLists.txt +++ b/libopenjpeg/jpwl/CMakeLists.txt @@ -3,6 +3,12 @@ ADD_DEFINITIONS(-DUSE_JPWL) SET(JPWL_SRCS crc.c jpwl.c jpwl_lib.c rs.c) +IF(APPLE) + SET_SOURCE_FILES_PROPERTIES( + rs.c + PROPERTIES + COMPILE_FLAGS -fno-common) +ENDIF(APPLE) INCLUDE_DIRECTORIES( ${OPENJPEG_SOURCE_DIR}/libopenjpeg