summaryrefslogtreecommitdiff
path: root/applications
diff options
context:
space:
mode:
authorAntonin Descampe <antonin@gmail.com>2011-08-12 14:59:28 +0000
committerAntonin Descampe <antonin@gmail.com>2011-08-12 14:59:28 +0000
commita098921d34c023c25dae8911f9ec94356db1592f (patch)
treed7a692e1dc67d3c1a6a9559934bd20b5851e1dec /applications
parent8ed4cb1a1ef01a5843f97b8a05e9218e73624c54 (diff)
added cmake support to openjpip
Diffstat (limited to 'applications')
-rw-r--r--applications/CMakeLists.txt4
-rw-r--r--applications/jpip/CHANGES3
-rw-r--r--applications/jpip/CMakeLists.txt5
-rw-r--r--applications/jpip/libopenjpip/CMakeLists.txt44
-rw-r--r--applications/jpip/opj_client/CMakeLists.txt1
-rw-r--r--applications/jpip/opj_client/opj_dec_server/CMakeLists.txt27
-rw-r--r--applications/jpip/opj_server/CMakeLists.txt29
-rw-r--r--applications/jpip/tools/CMakeLists.txt39
-rw-r--r--applications/jpip/tools/indexer/CMakeLists.txt26
9 files changed, 178 insertions, 0 deletions
diff --git a/applications/CMakeLists.txt b/applications/CMakeLists.txt
index 3b65ade1..d26e26db 100644
--- a/applications/CMakeLists.txt
+++ b/applications/CMakeLists.txt
@@ -7,3 +7,7 @@ ENDIF(BUILD_CODEC)
IF(BUILD_MJ2)
ADD_SUBDIRECTORY(mj2)
ENDIF(BUILD_MJ2)
+
+IF(BUILD_JPIP)
+ ADD_SUBDIRECTORY(jpip)
+ENDIF(BUILD_JPIP)
diff --git a/applications/jpip/CHANGES b/applications/jpip/CHANGES
index acf4d57f..755c205d 100644
--- a/applications/jpip/CHANGES
+++ b/applications/jpip/CHANGES
@@ -5,6 +5,9 @@ What's New for OpenJPIP
! : changed
+ : added
+August 12, 2011
++ [antonin] added cmake support to openjpip
+
July 6, 2011
* [antonin] JPIP : fixed autotools to work with recent name changes
diff --git a/applications/jpip/CMakeLists.txt b/applications/jpip/CMakeLists.txt
new file mode 100644
index 00000000..b6f6e2a5
--- /dev/null
+++ b/applications/jpip/CMakeLists.txt
@@ -0,0 +1,5 @@
+
+ADD_SUBDIRECTORY(libopenjpip)
+ADD_SUBDIRECTORY(opj_server)
+ADD_SUBDIRECTORY(opj_client)
+ADD_SUBDIRECTORY(tools) \ No newline at end of file
diff --git a/applications/jpip/libopenjpip/CMakeLists.txt b/applications/jpip/libopenjpip/CMakeLists.txt
new file mode 100644
index 00000000..3f42af7c
--- /dev/null
+++ b/applications/jpip/libopenjpip/CMakeLists.txt
@@ -0,0 +1,44 @@
+INCLUDE_REGULAR_EXPRESSION("^.*$")
+
+INCLUDE_DIRECTORIES(
+ ${FCGI_INCLUDE_DIRNAME}
+)
+
+# Defines the source code for the library
+SET(OPENJPIP_SRCS
+${CMAKE_CURRENT_SOURCE_DIR}/boxheader_manager.c
+${CMAKE_CURRENT_SOURCE_DIR}/codestream_manager.c
+${CMAKE_CURRENT_SOURCE_DIR}/imgreg_manager.c
+${CMAKE_CURRENT_SOURCE_DIR}/marker_manager.c
+${CMAKE_CURRENT_SOURCE_DIR}/msgqueue_manager.c
+${CMAKE_CURRENT_SOURCE_DIR}/box_manager.c
+${CMAKE_CURRENT_SOURCE_DIR}/faixbox_manager.c
+${CMAKE_CURRENT_SOURCE_DIR}/index_manager.c
+${CMAKE_CURRENT_SOURCE_DIR}/metadata_manager.c
+${CMAKE_CURRENT_SOURCE_DIR}/placeholder_manager.c
+${CMAKE_CURRENT_SOURCE_DIR}/byte_manager.c
+${CMAKE_CURRENT_SOURCE_DIR}/ihdrbox_manager.c
+${CMAKE_CURRENT_SOURCE_DIR}/manfbox_manager.c
+${CMAKE_CURRENT_SOURCE_DIR}/mhixbox_manager.c
+${CMAKE_CURRENT_SOURCE_DIR}/target_manager.c
+)
+
+# Build the library
+ADD_LIBRARY(openjpip_local ${OPENJPIP_SRCS})
+
+ADD_LIBRARY(openjpip_server ${OPENJPIP_SRCS})
+TARGET_LINK_LIBRARIES(openjpip_server ${FCGI_LIBNAME})
+SET_TARGET_PROPERTIES(openjpip_server
+ PROPERTIES COMPILE_FLAGS "-DSERVER")
+
+
+# Install library
+INSTALL(TARGETS openjpip_local
+ EXPORT OpenJPEGTargets
+ DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
+)
+
+INSTALL(TARGETS openjpip_server
+ EXPORT OpenJPEGTargets
+ DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
+)
diff --git a/applications/jpip/opj_client/CMakeLists.txt b/applications/jpip/opj_client/CMakeLists.txt
new file mode 100644
index 00000000..8cf71ace
--- /dev/null
+++ b/applications/jpip/opj_client/CMakeLists.txt
@@ -0,0 +1 @@
+ADD_SUBDIRECTORY(opj_dec_server) \ No newline at end of file
diff --git a/applications/jpip/opj_client/opj_dec_server/CMakeLists.txt b/applications/jpip/opj_client/opj_dec_server/CMakeLists.txt
new file mode 100644
index 00000000..437d706f
--- /dev/null
+++ b/applications/jpip/opj_client/opj_dec_server/CMakeLists.txt
@@ -0,0 +1,27 @@
+
+SET(OPJ_DEC_SERVER_SRCS
+${CMAKE_CURRENT_SOURCE_DIR}/cache_manager.c
+${CMAKE_CURRENT_SOURCE_DIR}/opj_dec_server.c
+${CMAKE_CURRENT_SOURCE_DIR}/jp2k_decoder.c
+${CMAKE_CURRENT_SOURCE_DIR}/imgsock_manager.c
+${CMAKE_CURRENT_SOURCE_DIR}/jpipstream_manager.c
+)
+
+INCLUDE_DIRECTORIES(
+ ../../libopenjpip
+)
+
+# Build executable
+
+ADD_EXECUTABLE(opj_dec_server ${OPJ_DEC_SERVER_SRCS})
+TARGET_LINK_LIBRARIES(opj_dec_server openjpip_local ${OPENJPEG_LIBRARY_NAME})
+
+# On unix you need to link to the math library:
+IF(UNIX)
+ TARGET_LINK_LIBRARIES(opj_dec_server m)
+ENDIF(UNIX)
+# Install exe
+INSTALL(TARGETS opj_dec_server
+ EXPORT OpenJPEGTargets
+ DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
+)
diff --git a/applications/jpip/opj_server/CMakeLists.txt b/applications/jpip/opj_server/CMakeLists.txt
new file mode 100644
index 00000000..c7bcedc5
--- /dev/null
+++ b/applications/jpip/opj_server/CMakeLists.txt
@@ -0,0 +1,29 @@
+
+# Headers file are located here:
+INCLUDE_DIRECTORIES(
+ ${FCGI_INCLUDE_DIRNAME}
+ ../libopenjpip
+)
+
+SET(OPJ_SERVER_SRCS
+${CMAKE_CURRENT_SOURCE_DIR}/channel_manager.c
+${CMAKE_CURRENT_SOURCE_DIR}/opj_server.c
+${CMAKE_CURRENT_SOURCE_DIR}/query_parser.c
+${CMAKE_CURRENT_SOURCE_DIR}/session_manager.c
+)
+
+# Build executable
+
+ADD_DEFINITIONS(-DSERVER)
+ADD_EXECUTABLE(opj_server ${OPJ_SERVER_SRCS})
+TARGET_LINK_LIBRARIES(opj_server openjpip_server ${FCGI_LIBNAME})
+
+# On unix you need to link to the math library:
+IF(UNIX)
+ TARGET_LINK_LIBRARIES(opj_server m)
+ENDIF(UNIX)
+# Install exe
+INSTALL(TARGETS opj_server
+ EXPORT OpenJPEGTargets
+ DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
+)
diff --git a/applications/jpip/tools/CMakeLists.txt b/applications/jpip/tools/CMakeLists.txt
new file mode 100644
index 00000000..04411622
--- /dev/null
+++ b/applications/jpip/tools/CMakeLists.txt
@@ -0,0 +1,39 @@
+
+ADD_SUBDIRECTORY(indexer)
+
+INCLUDE_DIRECTORIES(
+ ../libopenjpip
+)
+
+ADD_EXECUTABLE(jpip_to_j2k jpip_to_j2k.c)
+TARGET_LINK_LIBRARIES(jpip_to_j2k openjpip_local)
+IF(UNIX)
+ TARGET_LINK_LIBRARIES(jpip_to_j2k m)
+ENDIF(UNIX)
+# Install exe
+INSTALL(TARGETS jpip_to_j2k
+ EXPORT OpenJPEGTargets
+ DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
+)
+
+ADD_EXECUTABLE(jpip_to_jp2 jpip_to_jp2.c)
+TARGET_LINK_LIBRARIES(jpip_to_jp2 openjpip_local)
+IF(UNIX)
+ TARGET_LINK_LIBRARIES(jpip_to_jp2 m)
+ENDIF(UNIX)
+# Install exe
+INSTALL(TARGETS jpip_to_jp2
+ EXPORT OpenJPEGTargets
+ DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
+)
+
+ADD_EXECUTABLE(test_index test_index.c)
+TARGET_LINK_LIBRARIES(test_index openjpip_local)
+IF(UNIX)
+ TARGET_LINK_LIBRARIES(test_index m)
+ENDIF(UNIX)
+# Install exe
+INSTALL(TARGETS test_index
+ EXPORT OpenJPEGTargets
+ DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
+) \ No newline at end of file
diff --git a/applications/jpip/tools/indexer/CMakeLists.txt b/applications/jpip/tools/indexer/CMakeLists.txt
new file mode 100644
index 00000000..43422e50
--- /dev/null
+++ b/applications/jpip/tools/indexer/CMakeLists.txt
@@ -0,0 +1,26 @@
+SET(INDEXER_SRCS
+${CMAKE_CURRENT_SOURCE_DIR}/bio.c
+${CMAKE_CURRENT_SOURCE_DIR}/cio.c
+${CMAKE_CURRENT_SOURCE_DIR}/index_create.c
+${CMAKE_CURRENT_SOURCE_DIR}/int.c
+${CMAKE_CURRENT_SOURCE_DIR}/jp2.c
+${CMAKE_CURRENT_SOURCE_DIR}/jpip.c
+${CMAKE_CURRENT_SOURCE_DIR}/pi.c
+${CMAKE_CURRENT_SOURCE_DIR}/t2.c
+${CMAKE_CURRENT_SOURCE_DIR}/tcd.c
+${CMAKE_CURRENT_SOURCE_DIR}/tgt.c
+)
+
+# Build executable
+
+ADD_EXECUTABLE(index_create ${INDEXER_SRCS})
+
+# On unix you need to link to the math library:
+IF(UNIX)
+ TARGET_LINK_LIBRARIES(index_create m)
+ENDIF(UNIX)
+# Install exe
+INSTALL(TARGETS index_create
+ EXPORT OpenJPEGTargets
+ DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
+) \ No newline at end of file