STYLE: Remove completely reference to OPJ_EXPORT
[openjpeg.git] / libopenjpeg / CMakeLists.txt
1 INCLUDE_REGULAR_EXPRESSION("^.*$")
2 # Defines the source code for the library
3 SET(OpenJPEG_SRCS
4   bio.c
5   cio.c
6   dwt.c
7   event.c
8   fix.c
9   image.c
10   int.c
11   j2k.c
12   j2k_lib.c
13   jp2.c
14   jpt.c
15   mct.c
16   mqc.c
17   openjpeg.c
18   pi.c
19   raw.c
20   t1.c
21   t2.c
22   tcd.c
23   tgt.c
24 )
25
26 # Prepare the .def file (Module definition)
27 # depending on wether we are:
28 # 1. Building a dll (shared lib)
29 # 2. Wether we are using cl or bcc32 (underscore convention)
30 IF(WIN32 AND BUILD_SHARED_LIBS)
31   SET(UNDERSCORE)
32   # Borland expect symbol to start with _
33   IF(BORLAND)
34     SET(UNDERSCORE "_")
35   ENDIF(BORLAND)
36   # Borland will by default use a .def file if present in
37   # the binary directory
38   CONFIGURE_FILE(
39     ${OPENJPEG_SOURCE_DIR}/libopenjpeg/openjpeg.def.in
40     ${OPENJPEG_BINARY_DIR}/libopenjpeg/openjpeg.def
41     @ONLY IMMEDIATE
42     )
43   # You can directly pass a .def file to cl this is
44   # recognized
45   IF(NOT BORLAND)
46     SET(OpenJPEG_SRCS ${OpenJPEG_SRCS}
47       ${OPENJPEG_BINARY_DIR}/libopenjpeg/openjpeg.def
48       )
49   ENDIF(NOT BORLAND)
50 ENDIF(WIN32 AND BUILD_SHARED_LIBS)
51
52 # Create the library
53 ADD_LIBRARY(${OPJ_PREFIX}openjpeg ${OpenJPEG_SRCS})
54
55 # Install library
56 INSTALL_TARGETS(/lib/ ${OPJ_PREFIX}openjpeg)
57