summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2011-12-02 15:30:19 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2011-12-02 15:30:19 +0000
commitd4e5366fe64828c16c695e763e71e1b09dc68314 (patch)
tree36fceb8c026163e2e7e74c22ab907b19514d4aee
parentd7388d7e80b8d18090feca89c67e38a5d190fcbd (diff)
Simplify code. Use standard find_package call instead. ctest script will need to handle this now
-rw-r--r--CHANGES1
-rw-r--r--CMake/FindKAKADU.cmake19
-rw-r--r--CMakeLists.txt9
-rw-r--r--applications/jpip/libopenjpip/comMakefile.mk4
-rw-r--r--applications/jpip/util/Makefile.nix6
l---------applications/jpip/util/opj_viewer/dist/opj_viewer.jar2
-rw-r--r--tests/nonregression/CMakeLists.txt36
-rw-r--r--tests/nonregression/opj_ref_decode_cmd.sh.in4
8 files changed, 34 insertions, 47 deletions
diff --git a/CHANGES b/CHANGES
index 39f35838..362ec005 100644
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,7 @@ What's New for OpenJPEG
December 2, 2011
+ [mathieu] Adding CPack mechanism
+* [mathieu] remove hack with bash around kdu_expand
December 1, 2011
* [mickael] fix a bug during the creation of the codestream index
diff --git a/CMake/FindKAKADU.cmake b/CMake/FindKAKADU.cmake
new file mode 100644
index 00000000..763304d6
--- /dev/null
+++ b/CMake/FindKAKADU.cmake
@@ -0,0 +1,19 @@
+#
+# this module looks for KAKADu
+# http://www.kakadusoftware.com/
+#
+#
+# Copyright (c) 2006-2011 Mathieu Malaterre <mathieu.malaterre@gmail.com>
+#
+# Redistribution and use is allowed according to the terms of the New
+# BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+#
+
+FIND_PROGRAM(KDU_EXPAND_EXECUTABLE
+ kdu_expand
+ )
+
+MARK_AS_ADVANCED(
+ KDU_EXPAND_EXECUTABLE
+ )
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 61b02ee4..dafe44b6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -224,15 +224,6 @@ IF(BUILD_TESTING)
${CMAKE_SOURCE_DIR}/../data
)
- # For encoding tests we need the path to the ref decoder exe/lib (kakadu)
- FIND_PROGRAM(REF_DECODER_BIN
- NAMES kdu_expand
- DOC "Kakadu kdu_expand program used in encoder non-regression testing")
- IF(REF_DECODER_BIN)
- GET_FILENAME_COMPONENT(REF_DECODER_BIN_PATH ${REF_DECODER_BIN} PATH CACHE)
- MARK_AS_ADVANCED(REF_DECODER_BIN_PATH)
- ENDIF(REF_DECODER_BIN)
-
# Add repository where to find tests
ADD_SUBDIRECTORY(tests)
diff --git a/applications/jpip/libopenjpip/comMakefile.mk b/applications/jpip/libopenjpip/comMakefile.mk
index 1401b70f..53d59b83 100644
--- a/applications/jpip/libopenjpip/comMakefile.mk
+++ b/applications/jpip/libopenjpip/comMakefile.mk
@@ -1,9 +1,9 @@
ifdef jpipserver
-CFLAGS = -O3 -Wall -m32 -DSERVER
+CFLAGS = -g -Wall -DSERVER
LIBNAME = libopenjpip_server.a
else
J2KINCDIR = ../../../libopenjpeg
-CFLAGS = -O3 -Wall -I$(J2KINCDIR)
+CFLAGS = -g -Wall -I$(J2KINCDIR)
LIBNAME = libopenjpip_local.a
endif
diff --git a/applications/jpip/util/Makefile.nix b/applications/jpip/util/Makefile.nix
index 532b743d..39397a4c 100644
--- a/applications/jpip/util/Makefile.nix
+++ b/applications/jpip/util/Makefile.nix
@@ -1,12 +1,12 @@
JPIPLIBDIR = ../libopenjpip
SLIBFNAME = $(JPIPLIBDIR)/libopenjpip_server.a
-SCFLAGS = -O3 -Wall -m32 -I$(JPIPLIBDIR) -DSERVER -DQUIT_SIGNAL=\"quitJPIP\"
+SCFLAGS = -g -Wall -I$(JPIPLIBDIR) -DSERVER -DQUIT_SIGNAL=\"quitJPIP\"
SLDFLAGS = -L$(JPIPLIBDIR) -lm -lfcgi -lopenjpip_server
J2KINCDIR = ../../../libopenjpeg
-J2KLIBDIR = $(J2KINCDIR)/.libs
-LIBFNAME = $(JPIPLIBDIR)/libopenjpip_local.a $(J2KLIBDIR)/libopenjpeg.a
+J2KLIBDIR = $(J2KINCDIR)/../bin/bin
+LIBFNAME = $(JPIPLIBDIR)/libopenjpip_local.a $(J2KLIBDIR)/libopenjpeg.so
CFLAGS = -O3 -Wall -I$(JPIPLIBDIR)
LDFLAGS = -L$(JPIPLIBDIR) -L$(J2KLIBDIR) -lm -lopenjpip_local
diff --git a/applications/jpip/util/opj_viewer/dist/opj_viewer.jar b/applications/jpip/util/opj_viewer/dist/opj_viewer.jar
index 4fceec6d..4820aebc 120000
--- a/applications/jpip/util/opj_viewer/dist/opj_viewer.jar
+++ b/applications/jpip/util/opj_viewer/dist/opj_viewer.jar
@@ -1 +1 @@
-opj_viewer-20111026.jar \ No newline at end of file
+opj_viewer-20111124.jar \ No newline at end of file
diff --git a/tests/nonregression/CMakeLists.txt b/tests/nonregression/CMakeLists.txt
index 966a198d..ed984990 100644
--- a/tests/nonregression/CMakeLists.txt
+++ b/tests/nonregression/CMakeLists.txt
@@ -11,19 +11,8 @@ SET(INPUT_NR_PATH ${INPUT_NR})
SET(TEMP_PATH ${TEMP})
SET(INPUT_CONF_PATH ${OPJ_DATA_ROOT}/input/conformance)
-# FIXME: should be corectly manage with a find kakadu
-IF (NOT WIN32)
-CONFIGURE_FILE("opj_ref_decode_cmd.sh.in"
- "${CMAKE_CURRENT_BINARY_DIR}/opj_ref_decode_cmd.sh"
- @ONLY)
-ENDIF (NOT WIN32)
-
-IF (NOT REF_DECODER_BIN_PATH)
- MESSAGE(STATUS "REF_DECODER_BIN_PATH not set, if you want all the encoding tests suite provide the path to kdu_expand")
-ENDIF (NOT REF_DECODER_BIN_PATH)
-
-
-
+# need kdu_expand if possible
+find_package(KAKADU)
#########################################################################
# GENERATION OF THE TEST SUITE (DUMP)
@@ -264,21 +253,12 @@ FOREACH(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-dump)
# Decode the encoding file with kakadu expand command
- IF (REF_DECODER_BIN_PATH)
- IF (NOT WIN32)
- # Need a bash script to export the path of the kakadu library into PATH
- ADD_TEST( NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-decode-ref
- bash ${CMAKE_CURRENT_BINARY_DIR}/opj_ref_decode_cmd.sh
- -i ${OUTPUT_FILENAME}
- -o ${OUTPUT_FILENAME}.raw
- )
- ELSE (NOT WIN32)
- ADD_TEST(NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-decode-ref
- ${REF_DECODER_BIN_PATH}/kdu_expand
- -i ${OUTPUT_FILENAME}
- -o ${OUTPUT_FILENAME}.raw
+ IF (KDU_EXPAND_EXECUTABLE)
+ ADD_TEST(NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-decode-ref
+ ${KDU_EXPAND_EXECUTABLE}
+ -i ${OUTPUT_FILENAME}
+ -o ${OUTPUT_FILENAME}.raw
)
- ENDIF (NOT WIN32)
SET_TESTS_PROPERTIES(NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-decode-ref
PROPERTIES DEPENDS
@@ -295,7 +275,7 @@ FOREACH(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
PROPERTIES DEPENDS
NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-decode-ref)
- ENDIF(REF_DECODER_BIN_PATH)
+ ENDIF()
ENDIF(FAILED_TEST_FOUND)
# DECODER TEST SUITE
diff --git a/tests/nonregression/opj_ref_decode_cmd.sh.in b/tests/nonregression/opj_ref_decode_cmd.sh.in
deleted file mode 100644
index f2147886..00000000
--- a/tests/nonregression/opj_ref_decode_cmd.sh.in
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-export LD_LIBRARY_PATH="@REF_DECODER_BIN_PATH@"
-echo run following command: @REF_DECODER_BIN_PATH@/kdu_expand $@
-@REF_DECODER_BIN_PATH@/kdu_expand $@ \ No newline at end of file