From: Antonin Descampe Date: Fri, 3 Dec 2010 11:57:00 +0000 (+0000) Subject: workaround for name clash when building static and dynamic on WIN32 (see http://www... X-Git-Tag: version.1.4~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=02229c7c2d75ceb067e3c502a79d283425d0d123;p=openjpeg workaround for name clash when building static and dynamic on WIN32 (see http://www.vtk.org/Bug/view.php?id=10190 for description) --- diff --git a/CHANGES b/CHANGES index e4a6b4e0..e99405be 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,9 @@ What's New for OpenJPEG ! : changed + : added +December 3, 2010 +* [antonin] workaround for name clash when building static and dynamic on WIN32 (see http://www.vtk.org/Bug/view.php?id=10190 for description) + November 28, 2010 * [antonin] fixed a bug in codec/convert.c that prevented to build executables with WIN32 compiler (thanks winfried) ! [antonin] changed cmake behaviour: executables are now always statically linked. When -DBUIL_SHARED_LIBS option is ON (the default), the shared versions of the libraries are also built (but executables remain linked against the static libraries). diff --git a/libopenjpeg/CMakeLists.txt b/libopenjpeg/CMakeLists.txt index eb891d89..f1934d17 100644 --- a/libopenjpeg/CMakeLists.txt +++ b/libopenjpeg/CMakeLists.txt @@ -31,7 +31,7 @@ IF(WIN32) ADD_DEFINITIONS(-DOPJ_STATIC) ENDIF(WIN32) ADD_LIBRARY(${OPENJPEG_LIBRARY_NAME}.static STATIC ${OPENJPEG_SRCS}) -SET_TARGET_PROPERTIES(${OPENJPEG_LIBRARY_NAME}.static PROPERTIES OUTPUT_NAME ${OPENJPEG_LIBRARY_NAME}) +SET_TARGET_PROPERTIES(${OPENJPEG_LIBRARY_NAME}.static PROPERTIES CLEAN_DIRECT_OUTPUT 1 OUTPUT_NAME ${OPENJPEG_LIBRARY_NAME} PREFIX "lib") SET_TARGET_PROPERTIES(${OPENJPEG_LIBRARY_NAME}.static PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES}) IF(LCMS_LIB) TARGET_LINK_LIBRARIES(${OPENJPEG_LIBRARY_NAME}.static ${LCMS_LIB})