Use lowercase for cmake commands consistenly
[openjpeg.git] / src / bin / jp3d / CMakeLists.txt
1 # Build the demo app, small examples
2
3 # First thing define the common source:
4 set(common_SRCS
5   convert.c
6   ${OPENJPEG_SOURCE_DIR}/src/bin/common/opj_getopt.c
7   )
8
9 # Headers file are located here:
10 include_directories(
11   ${OPENJPEG_BINARY_DIR}/src/lib/openjp2 # opj_config.h
12   ${OPENJPEG_SOURCE_DIR}/src/lib/openjp3d
13   ${LCMS_INCLUDE_DIRNAME}
14   ${OPENJPEG_SOURCE_DIR}/src/bin/common
15   ${Z_INCLUDE_DIRNAME}
16   ${PNG_INCLUDE_DIRNAME}
17   ${TIFF_INCLUDE_DIRNAME}
18   )
19
20 if(WIN32)
21   if(BUILD_SHARED_LIBS)
22     add_definitions(-DOPJ_EXPORTS)
23   else()
24     add_definitions(-DOPJ_STATIC)
25   endif()
26 endif()
27
28 # Loop over all executables:
29 foreach(exe opj_jp3d_compress opj_jp3d_decompress)
30   add_executable(${exe} ${exe}.c ${common_SRCS})
31   target_link_libraries(${exe} openjp3d)
32   # On unix you need to link to the math library:
33   if(UNIX)
34     target_link_libraries(${exe} m)
35   endif(UNIX)
36   # Install exe
37   install(TARGETS ${exe}
38     EXPORT OpenJP3DTargets
39     DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
40   )
41 endforeach()