1 # Build the demo app, small examples
3 # First thing define the common source:
8 # If not getopt was found then add it to the lib:
14 ENDIF(DONT_HAVE_GETOPT)
17 # Headers file are located here:
19 ${OPENJPEG_SOURCE_DIR}/libopenjpeg
22 # Do the proper thing when building static...if only there was configured
23 # headers or def files instead
24 IF(NOT BUILD_SHARED_LIBS)
25 ADD_DEFINITIONS(-DOPJ_STATIC)
26 ENDIF(NOT BUILD_SHARED_LIBS)
28 FIND_PACKAGE(TIFF REQUIRED)
30 # Loop over all executables:
31 FOREACH(exe j2k_to_image image_to_j2k)
32 ADD_EXECUTABLE(${exe} ${exe}.c ${common_SRCS})
33 TARGET_LINK_LIBRARIES(${exe} ${OPJ_PREFIX}openjpeg ${TIFF_LIBRARIES})
34 # On unix you need to link to the math library:
36 TARGET_LINK_LIBRARIES(${exe} -lm)
39 INSTALL_TARGETS(/bin/ ${exe})