2007-09-06 12:51:38 +02:00
|
|
|
# Build the demo app, small examples
|
|
|
|
|
|
|
|
# First thing define the common source:
|
|
|
|
SET(common_SRCS
|
|
|
|
convert.c
|
|
|
|
)
|
|
|
|
|
2011-01-02 19:10:09 +01:00
|
|
|
IF(WIN32)
|
|
|
|
IF(BUILD_SHARED_LIBS)
|
|
|
|
ADD_DEFINITIONS(-DOPJ_EXPORTS)
|
|
|
|
ELSE(BUILD_SHARED_LIBS)
|
|
|
|
ADD_DEFINITIONS(-DOPJ_STATIC)
|
|
|
|
ENDIF(BUILD_SHARED_LIBS)
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
2007-09-06 12:51:38 +02:00
|
|
|
# Loop over all executables:
|
|
|
|
FOREACH(exe jp3d_to_volume volume_to_jp3d)
|
|
|
|
ADD_EXECUTABLE(${exe} ${exe}.c ${common_SRCS})
|
2011-04-13 17:24:36 +02:00
|
|
|
TARGET_LINK_LIBRARIES(${exe} ${OPENJPEG3D_LIBRARY_NAME})
|
2007-09-06 12:51:38 +02:00
|
|
|
# On unix you need to link to the math library:
|
|
|
|
IF(UNIX)
|
|
|
|
TARGET_LINK_LIBRARIES(${exe} m)
|
|
|
|
ENDIF(UNIX)
|
|
|
|
# Install exe
|
2011-04-13 17:24:36 +02:00
|
|
|
INSTALL(TARGETS ${exe}
|
|
|
|
EXPORT OpenJPEG3DTargets
|
|
|
|
DESTINATION ${OPENJPEG3D_INSTALL_BIN_DIR} COMPONENT Applications
|
|
|
|
)
|
2007-09-06 12:51:38 +02:00
|
|
|
ENDFOREACH(exe)
|