summaryrefslogtreecommitdiff
path: root/src/bin/mj2
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2012-10-15 09:44:34 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2012-10-15 09:44:34 +0000
commitdff377a741ec87f8737002cf112ae12655881777 (patch)
tree24fec645259014dc1e60f393d5d39c2b36aa603c /src/bin/mj2
parentb24cf8d1574c00915c568314d3e0e011ca77ba89 (diff)
[trunk] Fix compilation:
- using mingw32 compiler (missing exported symbols) - using -fvisibility=hidden (gcc on UNIX)
Diffstat (limited to 'src/bin/mj2')
-rw-r--r--src/bin/mj2/CMakeLists.txt6
-rw-r--r--src/bin/mj2/opj_mj2_compress.c1
2 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/mj2/CMakeLists.txt b/src/bin/mj2/CMakeLists.txt
index a8f5ca9f..d9cc67de 100644
--- a/src/bin/mj2/CMakeLists.txt
+++ b/src/bin/mj2/CMakeLists.txt
@@ -3,7 +3,11 @@
set(common_SRCS ${OPENJPEG_SOURCE_DIR}/src/bin/common/opj_getopt.c)
if(WIN32)
- add_definitions(-DOPJ_STATIC)
+ if(BUILD_SHARED_LIBS)
+ add_definitions(-DOPJ_EXPORTS)
+ else()
+ add_definitions(-DOPJ_STATIC)
+ endif()
endif()
# Headers file are located here:
diff --git a/src/bin/mj2/opj_mj2_compress.c b/src/bin/mj2/opj_mj2_compress.c
index b17b8f69..fbf25fe3 100644
--- a/src/bin/mj2/opj_mj2_compress.c
+++ b/src/bin/mj2/opj_mj2_compress.c
@@ -29,6 +29,7 @@
#include <stdlib.h>
#include <string.h>
+#include "opj_config.h"
#include "openjpeg.h"
#include "j2k_lib.h"
#include "cio.h"