openjpeg/libopenjpeg3d/CMakeLists.txt

38 lines
1.1 KiB
CMake
Raw Normal View History

INCLUDE_REGULAR_EXPRESSION("^.*$")
# Defines the source code for the library
2011-04-16 13:26:16 +02:00
SET(OPENJP3D_SRCS
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
)
# 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})
IF(UNIX)
2011-04-16 13:26:16 +02:00
TARGET_LINK_LIBRARIES(${OPENJP3D_LIBRARY_NAME} m)
ENDIF(UNIX)
2011-04-16 13:26:16 +02:00
SET_TARGET_PROPERTIES(${OPENJP3D_LIBRARY_NAME} PROPERTIES ${OPENJP3D_LIBRARY_PROPERTIES})
# Install library
2011-04-16 13:26:16 +02:00
INSTALL(TARGETS ${OPENJP3D_LIBRARY_NAME}
EXPORT OpenJP3DTargets
DESTINATION ${OPENJP3D_INSTALL_LIB_DIR}
COMPONENT Libraries
)
# Install includes files
2011-04-16 13:26:16 +02:00
INSTALL(FILES openjp3d.h
DESTINATION ${OPENJP3D_INSTALL_INCLUDE_DIR}/${subdir}
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)")