Commit 096667c1 authored by Guillaume Pasero's avatar Guillaume Pasero

COMP: VC10: add static/shared define in header otb_openjpeg

parent 11f3db41
......@@ -5,8 +5,22 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/otbopenjpeg/libopenjpeg/openjpeg.h
${CMAKE_CURRENT_BINARY_DIR}/otbopenjpeg
)
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/otb_openjpeg.h
${CMAKE_CURRENT_BINARY_DIR}
if(WIN32)
# TODO : change the static/shared detection when using external openjpeg
if(BUILD_SHARED_LIBS)
set(OPJ_EXPORTS 1)
unset(OPJ_STATIC)
else()
unset(OPJ_EXPORTS)
set(OPJ_STATIC 1)
endif()
else()
unset(OPJ_STATIC)
unset(OPJ_EXPORTS)
endif()
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/otb_openjpeg.h.in
${CMAKE_CURRENT_BINARY_DIR}/otb_openjpeg.h
)
add_subdirectory( otbopenjpeg )
\ No newline at end of file
add_subdirectory( otbopenjpeg )
......@@ -17,6 +17,14 @@
=========================================================================*/
#ifndef __otb_openjpeg_h
#ifndef OPJ_STATIC
#cmakedefine OPJ_STATIC
#endif
#ifndef OPJ_EXPORTS
#cmakedefine OPJ_EXPORTS
#endif
#include "otbopenjpeg/openjpeg.h"
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment