summaryrefslogtreecommitdiff
path: root/libopenjpeg
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2006-02-05 21:39:19 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2006-02-05 21:39:19 +0000
commit23eeec876922ca8d593a7b43bfe22d131c3b7902 (patch)
tree8f0ed615c8e8209cf241b42378e3775e948a2ebe /libopenjpeg
parentf31d963a643a0541ccbe47e119567aa3692c2f9d (diff)
ENH: Do the proper thing for static/shared
Diffstat (limited to 'libopenjpeg')
-rw-r--r--libopenjpeg/CMakeLists.txt13
1 files changed, 8 insertions, 5 deletions
diff --git a/libopenjpeg/CMakeLists.txt b/libopenjpeg/CMakeLists.txt
index 1355b4ae..2c1816f4 100644
--- a/libopenjpeg/CMakeLists.txt
+++ b/libopenjpeg/CMakeLists.txt
@@ -21,11 +21,14 @@ SET(OpenJPEG_SRCS
tgt.c
)
-# Pass proper definition to preprocessor to generate
-# shared lib
-IF(WIN32 AND BUILD_SHARED_LIBS)
- ADD_DEFINITIONS(-DOPJ_EXPORTS)
-ENDIF(WIN32 AND BUILD_SHARED_LIBS)
+# Pass proper definition to preprocessor to generate shared lib
+IF(WIN32)
+ IF(BUILD_SHARED_LIBS)
+ ADD_DEFINITIONS(-DOPJ_EXPORTS)
+ ELSE(BUILD_SHARED_LIBS)
+ ADD_DEFINITIONS(-DOPJ_STATIC)
+ ENDIF(BUILD_SHARED_LIBS)
+ENDIF(WIN32)
# Create the library
ADD_LIBRARY(${OPJ_PREFIX}openjpeg ${OpenJPEG_SRCS})