X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=CMakeLists.txt;h=1af3a073352dd3af0980c759f0db1a77e1751f8b;hb=b551844cc2412981bcf7c26c897c07c0e6bc6a8e;hp=de047b789719b708b265f0a8cae1490b043a007e;hpb=f88a57e5d79e36117dd96309dbfe55f654584653;p=openjpeg.git diff --git a/CMakeLists.txt b/CMakeLists.txt index de047b78..1af3a073 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -110,10 +110,6 @@ ENDIF(NOT OPENJPEG_INSTALL_PACKAGE_DIR) # Test for some required system information. INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityC.cmake) -#----------------------------------------------------------------------------- -# Test for getopt being available in this system -INCLUDE (${OPENJPEG_SOURCE_DIR}/CMake/CheckHaveGetopt.cmake ) - #----------------------------------------------------------------------------- # Setup file for setting custom ctest vars CONFIGURE_FILE( @@ -212,12 +208,13 @@ ADD_SUBDIRECTORY(libopenjpeg) # Build Applications OPTION(BUILD_CODEC "Build the CODEC executables" ON) OPTION(BUILD_MJ2 "Build the MJ2 executables." OFF) +OPTION(BUILD_JPIP "Build the JPIP library and executables." OFF) -IF(BUILD_CODEC OR BUILD_MJ2) +IF(BUILD_CODEC OR BUILD_MJ2 OR BUILD_JPIP) OPTION(BUILD_THIRDPARTY "Build the thirdparty executables if it is needed" OFF) ADD_SUBDIRECTORY(thirdparty) ADD_SUBDIRECTORY(applications) -ENDIF (BUILD_CODEC OR BUILD_MJ2) +ENDIF (BUILD_CODEC OR BUILD_MJ2 OR BUILD_JPIP) #----------------------------------------------------------------------------- # opj_config.h generation (2/2) @@ -242,18 +239,19 @@ IF(BUILD_TESTING) ENABLE_TESTING() INCLUDE(CTest) - # Add repository where to find tests - ADD_SUBDIRECTORY(tests) - # Search openjpeg data needed for the tests # They could be found via svn on the OpenJPEG google code project # svn checkout http://openjpeg.googlecode.com/svn/data (about 70 Mo) FIND_PATH(OPJ_DATA_ROOT README-OPJ-Data - PATHS $ENV{OPJ_DATA_ROOT} ${CMAKE_SOURCE_DIR}/../opj-data) - - SET (REF_DECODER_BIN_PATH "NOT-FOUND" CACHE PATH "Single directory where find the reference encoder binaries to enable encoding test suite.") + PATHS $ENV{OPJ_DATA_ROOT} ${CMAKE_SOURCE_DIR}/../data) + + # For encoding tests we need the path to the ref decoder exe/lib (kakadu) + SET (REF_DECODER_BIN_PATH "NOTFOUND" CACHE PATH "Single directory where find the reference decoder binaries to enable encoding test suite.") MARK_AS_ADVANCED(REF_DECODER_BIN_PATH) - + + # Add repository where to find tests + ADD_SUBDIRECTORY(tests) + ELSE(BUILD_CODEC) message(FATAL_ERROR "You need build codec to run the tests") ENDIF(BUILD_CODEC)