2011-04-13 17:24:36 +02:00
|
|
|
|
|
|
|
INCLUDE_REGULAR_EXPRESSION("^.*$")
|
|
|
|
|
|
|
|
# Defines the source code for the library
|
2011-04-16 13:26:16 +02:00
|
|
|
SET(OPENJP3D_SRCS
|
2011-04-16 13:29:51 +02:00
|
|
|
bio.c cio.c dwt.c event.c jp3d.c jp3d_lib.c mct.c mqc.c openjp3d.c pi.c raw.c t1.c t1_3d.c t2.c tcd.c tgt.c volume.c
|
2011-04-13 17:24:36 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
# Build the library
|
|
|
|
IF(WIN32)
|
|
|
|
IF(BUILD_SHARED_LIBS)
|
|
|
|
ADD_DEFINITIONS(-DOPJ_EXPORTS)
|
|
|
|
ELSE(BUILD_SHARED_LIBS)
|
|
|
|
ADD_DEFINITIONS(-DOPJ_STATIC)
|
|
|
|
ENDIF(BUILD_SHARED_LIBS)
|
|
|
|
ENDIF(WIN32)
|
2011-04-16 13:26:16 +02:00
|
|
|
ADD_LIBRARY(${OPENJP3D_LIBRARY_NAME} ${OPENJP3D_SRCS})
|
2011-04-13 17:24:36 +02:00
|
|
|
IF(UNIX)
|
2011-04-16 13:26:16 +02:00
|
|
|
TARGET_LINK_LIBRARIES(${OPENJP3D_LIBRARY_NAME} m)
|
2011-04-13 17:24:36 +02:00
|
|
|
ENDIF(UNIX)
|
2011-04-16 13:26:16 +02:00
|
|
|
SET_TARGET_PROPERTIES(${OPENJP3D_LIBRARY_NAME} PROPERTIES ${OPENJP3D_LIBRARY_PROPERTIES})
|
2011-04-13 17:24:36 +02:00
|
|
|
|
|
|
|
# Install library
|
2011-04-16 13:26:16 +02:00
|
|
|
INSTALL(TARGETS ${OPENJP3D_LIBRARY_NAME}
|
|
|
|
EXPORT OpenJP3DTargets
|
|
|
|
DESTINATION ${OPENJP3D_INSTALL_LIB_DIR}
|
2011-04-13 17:24:36 +02:00
|
|
|
COMPONENT Libraries
|
|
|
|
)
|
|
|
|
|
|
|
|
# Install includes files
|
2011-04-16 13:26:16 +02:00
|
|
|
INSTALL(FILES openjp3d.h
|
|
|
|
DESTINATION ${OPENJP3D_INSTALL_INCLUDE_DIR}/${subdir}
|
2011-04-13 17:24:36 +02:00
|
|
|
COMPONENT Headers
|
|
|
|
)
|
|
|
|
INSTALL(CODE
|
2011-04-16 13:26:16 +02:00
|
|
|
"EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${subdir}/openjp3d.h \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${OPENJP3D_INSTALL_INCLUDE_DIR}/openjp3d.h)")
|
2011-04-13 17:24:36 +02:00
|
|
|
|