Merge pull request #769 from julienmalik/cmake_lowercase

Use lowercase for cmake commands consistenly
This commit is contained in:
julienmalik 2016-05-02 21:57:55 +02:00
commit 94cfb1b008
21 changed files with 201 additions and 201 deletions

View File

@ -56,7 +56,7 @@ set(PACKAGE_VERSION
# you can specify your own OPENJPEG_SOVERSION at cmake configuration time: # you can specify your own OPENJPEG_SOVERSION at cmake configuration time:
# cmake -DOPENJPEG_SOVERSION:STRING=42 /path/to/openjpeg # cmake -DOPENJPEG_SOVERSION:STRING=42 /path/to/openjpeg
if(NOT OPENJPEG_SOVERSION) if(NOT OPENJPEG_SOVERSION)
SET(OPENJPEG_SOVERSION 7) set(OPENJPEG_SOVERSION 7)
endif(NOT OPENJPEG_SOVERSION) endif(NOT OPENJPEG_SOVERSION)
set(OPENJPEG_LIBRARY_PROPERTIES set(OPENJPEG_LIBRARY_PROPERTIES
VERSION "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}" VERSION "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}"
@ -190,7 +190,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
# For all builds, make sure openjpeg is std99 compliant: # For all builds, make sure openjpeg is std99 compliant:
# set(CMAKE_C_FLAGS "-Wall -std=c99 ${CMAKE_C_FLAGS}") # FIXME: this setting prevented us from setting a coverage build. # set(CMAKE_C_FLAGS "-Wall -std=c99 ${CMAKE_C_FLAGS}") # FIXME: this setting prevented us from setting a coverage build.
# Do not use ffast-math for all build, it would produce incorrect results, only set for release: # Do not use ffast-math for all build, it would produce incorrect results, only set for release:
SET(OPENJPEG_LIBRARY_COMPILE_OPTIONS ${OPENJPEG_LIBRARY_COMPILE_OPTIONS} "$<$<CONFIG:Release>:-ffast-math>") set(OPENJPEG_LIBRARY_COMPILE_OPTIONS ${OPENJPEG_LIBRARY_COMPILE_OPTIONS} "$<$<CONFIG:Release>:-ffast-math>")
endif() endif()
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@ -281,7 +281,7 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/src/lib/openjp2/opj_config.h ${CMAKE_CURRENT_BINARY_DIR}/src/lib/openjp2/opj_config.h
@ONLY @ONLY
) )
configure_file( configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp2/opj_config_private.h.cmake.in ${CMAKE_CURRENT_SOURCE_DIR}/src/lib/openjp2/opj_config_private.h.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/src/lib/openjp2/opj_config_private.h ${CMAKE_CURRENT_BINARY_DIR}/src/lib/openjp2/opj_config_private.h

View File

@ -1,5 +1,5 @@
# Ensure that an include file is provided by the system # Ensure that an include file is provided by the system
# Add the check about the mandatory status to the check_include_file macro # Add the check about the mandatory status to the check_include_file macro
# provided by cmake # provided by cmake
include (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) include (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
@ -23,4 +23,4 @@ if (NOT ${${VARIABLE_NAME}})
endif() endif()
endif() endif()
endmacro() endmacro()

View File

@ -145,7 +145,7 @@ HTML_STYLESHEET =
HTML_COLORSTYLE_HUE = 220 HTML_COLORSTYLE_HUE = 220
HTML_COLORSTYLE_SAT = 100 HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_GAMMA = 80 HTML_COLORSTYLE_GAMMA = 80
HTML_TIMESTAMP = NO HTML_TIMESTAMP = NO
HTML_ALIGN_MEMBERS = YES HTML_ALIGN_MEMBERS = YES
HTML_DYNAMIC_SECTIONS = NO HTML_DYNAMIC_SECTIONS = NO
GENERATE_DOCSET = NO GENERATE_DOCSET = NO

View File

@ -1,7 +1,7 @@
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# opj_apps_config.h generation # opj_apps_config.h generation
configure_file( configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/opj_apps_config.h.cmake.in ${CMAKE_CURRENT_SOURCE_DIR}/opj_apps_config.h.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/opj_apps_config.h ${CMAKE_CURRENT_BINARY_DIR}/opj_apps_config.h
@ONLY @ONLY
) )

View File

@ -13,7 +13,7 @@ set(common_SRCS
${OPENJPEG_SOURCE_DIR}/src/bin/common/opj_getopt.h ${OPENJPEG_SOURCE_DIR}/src/bin/common/opj_getopt.h
${OPENJPEG_SOURCE_DIR}/src/bin/common/opj_string.h ${OPENJPEG_SOURCE_DIR}/src/bin/common/opj_string.h
) )
if(OPJ_HAVE_LIBTIFF) if(OPJ_HAVE_LIBTIFF)
list(APPEND common_SRCS converttif.c) list(APPEND common_SRCS converttif.c)
endif() endif()
@ -64,7 +64,7 @@ foreach(exe opj_decompress opj_compress opj_dump)
DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
) )
if(OPJ_USE_DSYMUTIL) if(OPJ_USE_DSYMUTIL)
add_custom_command(TARGET ${exe} POST_BUILD add_custom_command(TARGET ${exe} POST_BUILD
COMMAND "dsymutil" "$<TARGET_FILE:${exe}>" COMMAND "dsymutil" "$<TARGET_FILE:${exe}>"
COMMENT "dsymutil $<TARGET_FILE:${exe}>" COMMENT "dsymutil $<TARGET_FILE:${exe}>"
DEPENDS ${exe}) DEPENDS ${exe})

View File

@ -1,7 +1,7 @@
# Build the demo app, small examples # Build the demo app, small examples
# First thing define the common source: # First thing define the common source:
SET(common_SRCS set(common_SRCS
convert.c convert.c
${OPENJPEG_SOURCE_DIR}/src/bin/common/opj_getopt.c ${OPENJPEG_SOURCE_DIR}/src/bin/common/opj_getopt.c
) )
@ -26,15 +26,15 @@ if(WIN32)
endif() endif()
# Loop over all executables: # Loop over all executables:
FOREACH(exe opj_jp3d_compress opj_jp3d_decompress) foreach(exe opj_jp3d_compress opj_jp3d_decompress)
ADD_EXECUTABLE(${exe} ${exe}.c ${common_SRCS}) add_executable(${exe} ${exe}.c ${common_SRCS})
TARGET_LINK_LIBRARIES(${exe} openjp3d) target_link_libraries(${exe} openjp3d)
# On unix you need to link to the math library: # On unix you need to link to the math library:
IF(UNIX) if(UNIX)
TARGET_LINK_LIBRARIES(${exe} m) target_link_libraries(${exe} m)
ENDIF(UNIX) endif(UNIX)
# Install exe # Install exe
INSTALL(TARGETS ${exe} install(TARGETS ${exe}
EXPORT OpenJP3DTargets EXPORT OpenJP3DTargets
DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
) )

View File

@ -60,7 +60,7 @@ endforeach()
find_package(Java 1.5 COMPONENTS Development) # javac, jar find_package(Java 1.5 COMPONENTS Development) # javac, jar
# User can override this: # User can override this:
if(NOT DEFINED JAVA_SOURCE_VERSION) if(NOT DEFINED JAVA_SOURCE_VERSION)
set(JAVA_SOURCE_VERSION 1.5) set(JAVA_SOURCE_VERSION 1.5)
endif() endif()
if(NOT DEFINED JAVA_TARGET_VERSION) if(NOT DEFINED JAVA_TARGET_VERSION)

View File

@ -37,11 +37,11 @@ foreach(exe
APPEND PROPERTY COMPILE_DEFINITIONS USE_MJ2 APPEND PROPERTY COMPILE_DEFINITIONS USE_MJ2
) )
target_link_libraries(${exe} ${LCMS_LIBNAME} openmj2) target_link_libraries(${exe} ${LCMS_LIBNAME} openmj2)
if(UNIX) if(UNIX)
target_link_libraries(${exe} m) target_link_libraries(${exe} m)
endif() endif()
install(TARGETS ${exe} install(TARGETS ${exe}
DESTINATION ${OPENJPEG_INSTALL_BIN_DIR}) DESTINATION ${OPENJPEG_INSTALL_BIN_DIR})
endforeach() endforeach()

View File

@ -136,7 +136,7 @@ endif()
if(OPJ_USE_DSYMUTIL) if(OPJ_USE_DSYMUTIL)
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
add_custom_command(TARGET ${OPENJPEG_LIBRARY_NAME} POST_BUILD add_custom_command(TARGET ${OPENJPEG_LIBRARY_NAME} POST_BUILD
COMMAND "dsymutil" "$<TARGET_SONAME_FILE:${OPENJPEG_LIBRARY_NAME}>" COMMAND "dsymutil" "$<TARGET_SONAME_FILE:${OPENJPEG_LIBRARY_NAME}>"
COMMENT "dsymutil $<TARGET_SONAME_FILE:${OPENJPEG_LIBRARY_NAME}>" COMMENT "dsymutil $<TARGET_SONAME_FILE:${OPENJPEG_LIBRARY_NAME}>"
DEPENDS ${OPENJPEG_LIBRARY_NAME}) DEPENDS ${OPENJPEG_LIBRARY_NAME})

View File

@ -5,9 +5,9 @@ include_directories(
${OPENJPEG_BINARY_DIR}/src/lib/openjp2 # opj_config.h ${OPENJPEG_BINARY_DIR}/src/lib/openjp2 # opj_config.h
) )
SET(OPENJP3D_LIBRARY_NAME openjp3d) set(OPENJP3D_LIBRARY_NAME openjp3d)
# Defines the source code for the library # Defines the source code for the library
SET(OPENJP3D_SRCS set(OPENJP3D_SRCS
bio.c cio.c dwt.c event.c jp3d.c jp3d_lib.c mct.c mqc.c openjp3d.c 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 pi.c raw.c t1.c t1_3d.c t2.c tcd.c tgt.c volume.c
) )
@ -34,7 +34,7 @@ endif()
# Install library # Install library
install(TARGETS ${OPENJP3D_LIBRARY_NAME} install(TARGETS ${OPENJP3D_LIBRARY_NAME}
EXPORT OpenJP3DTargets EXPORT OpenJP3DTargets
DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} DESTINATION ${OPENJPEG_INSTALL_LIB_DIR}
COMPONENT Libraries COMPONENT Libraries
) )

View File

@ -53,12 +53,12 @@ endif()
# Install library # Install library
install(TARGETS ${OPENMJ2_LIBRARY_NAME} install(TARGETS ${OPENMJ2_LIBRARY_NAME}
EXPORT OpenMJ2Targets EXPORT OpenMJ2Targets
DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} DESTINATION ${OPENJPEG_INSTALL_LIB_DIR}
COMPONENT Libraries COMPONENT Libraries
) )
# Install includes files # Install includes files
#INSTALL(FILES mj2.h #install(FILES mj2.h
# DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR}/${subdir} # DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR}/${subdir}
# COMPONENT Headers # COMPONENT Headers
#) #)

View File

@ -55,7 +55,7 @@ set(BLACKLIST_JPEG2000_TMP
# Define a list of file which should be gracefully rejected: # Define a list of file which should be gracefully rejected:
set(BLACKLIST_JPEG2000 set(BLACKLIST_JPEG2000
${BLACKLIST_JPEG2000_TMP} ${BLACKLIST_JPEG2000_TMP}
broken1.jp2 broken1.jp2
broken2.jp2 broken2.jp2
broken3.jp2 broken3.jp2
broken4.jp2 broken4.jp2
@ -340,7 +340,7 @@ foreach(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-decode-ref) NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-decode-ref)
endif() endif()
# Test the encoded file is a valid JP2 file # Test the encoded file is a valid JP2 file
if (JPYLYZER_EXECUTABLE) if (JPYLYZER_EXECUTABLE)
if (${OUTPUT_FILENAME} MATCHES "\\.jp2$") if (${OUTPUT_FILENAME} MATCHES "\\.jp2$")
@ -348,13 +348,13 @@ foreach(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
COMMAND ${JPYLYZER_EXECUTABLE} COMMAND ${JPYLYZER_EXECUTABLE}
${OUTPUT_FILENAME} ${OUTPUT_FILENAME}
) )
set_tests_properties(NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-jpylyser PROPERTIES set_tests_properties(NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-jpylyser PROPERTIES
DEPENDS NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-encode DEPENDS NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-encode
PASS_REGULAR_EXPRESSION "<isValidJP2>True</isValidJP2>" PASS_REGULAR_EXPRESSION "<isValidJP2>True</isValidJP2>"
) )
endif() endif()
endif(JPYLYZER_EXECUTABLE) endif(JPYLYZER_EXECUTABLE)
# If lossless compression (simple test is 4 arguments), decompress & compare # If lossless compression (simple test is 4 arguments), decompress & compare
list(LENGTH CMD_ARG_LIST_2 ARG_COUNT) list(LENGTH CMD_ARG_LIST_2 ARG_COUNT)
if (ARG_COUNT EQUAL 4) if (ARG_COUNT EQUAL 4)
@ -363,13 +363,13 @@ foreach(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
add_test(NAME NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-lossless-decode add_test(NAME NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-lossless-decode
COMMAND opj_decompress -i ${OUTPUT_FILENAME} -o ${OUTPUT_FILENAME}.lossless.tif COMMAND opj_decompress -i ${OUTPUT_FILENAME} -o ${OUTPUT_FILENAME}.lossless.tif
) )
set_tests_properties(NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-lossless-decode PROPERTIES set_tests_properties(NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-lossless-decode PROPERTIES
DEPENDS NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-encode DEPENDS NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-encode
) )
add_test(NAME NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-lossless-compare add_test(NAME NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-lossless-compare
COMMAND compare_images -b ${INPUT_FILENAME} -t ${OUTPUT_FILENAME}.lossless.tif -n 1 -d COMMAND compare_images -b ${INPUT_FILENAME} -t ${OUTPUT_FILENAME}.lossless.tif -n 1 -d
) )
set_tests_properties(NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-lossless-compare PROPERTIES set_tests_properties(NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-lossless-compare PROPERTIES
DEPENDS NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-lossless-decode DEPENDS NR-ENC-${INPUT_FILENAME_NAME}-${IT_TEST_ENC}-lossless-decode
) )
endif() endif()
@ -401,7 +401,7 @@ foreach(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
-DOUTFILENAME:STRING=${OUTPUT_FILENAME} -DOUTFILENAME:STRING=${OUTPUT_FILENAME}
-P ${CMAKE_CURRENT_SOURCE_DIR}/checkmd5refs.cmake) -P ${CMAKE_CURRENT_SOURCE_DIR}/checkmd5refs.cmake)
set_tests_properties(NR-DEC-${INPUT_FILENAME_NAME}-${IT_TEST_DEC}-decode-md5 set_tests_properties(NR-DEC-${INPUT_FILENAME_NAME}-${IT_TEST_DEC}-decode-md5
PROPERTIES DEPENDS NR-DEC-${INPUT_FILENAME_NAME}-${IT_TEST_DEC}-decode PROPERTIES DEPENDS NR-DEC-${INPUT_FILENAME_NAME}-${IT_TEST_DEC}-decode
) )

View File

@ -43,11 +43,11 @@ file(READ ${REFFILE} variable)
foreach(pgxfullpath ${globfiles}) foreach(pgxfullpath ${globfiles})
file(MD5 ${pgxfullpath} output) file(MD5 ${pgxfullpath} output)
get_filename_component(pgxfile ${pgxfullpath} NAME) get_filename_component(pgxfile ${pgxfullpath} NAME)
string(REGEX MATCH "[0-9a-f]+ ${pgxfile}" output_var "${variable}") string(REGEX MATCH "[0-9a-f]+ ${pgxfile}" output_var "${variable}")
set(output "${output} ${pgxfile}") set(output "${output} ${pgxfile}")
if("${output_var}" STREQUAL "${output}") if("${output_var}" STREQUAL "${output}")
message(STATUS "equal: [${output_var}] vs [${output}]") message(STATUS "equal: [${output_var}] vs [${output}]")
else() else()

View File

@ -1,4 +1,4 @@
# UNIT TESTS # UNIT TESTS
include_directories( include_directories(
${OPENJPEG_BINARY_DIR}/src/lib/openjp2 # opj_config.h ${OPENJPEG_BINARY_DIR}/src/lib/openjp2 # opj_config.h

View File

@ -2,117 +2,117 @@
#------------ #------------
# Try to find lib Z # Try to find lib Z
IF(BUILD_THIRDPARTY) if(BUILD_THIRDPARTY)
# Try to build it # Try to build it
message(STATUS "We will build Z lib from thirdparty") message(STATUS "We will build Z lib from thirdparty")
ADD_SUBDIRECTORY(libz) add_subdirectory(libz)
SET(Z_LIBNAME z PARENT_SCOPE) set(Z_LIBNAME z PARENT_SCOPE)
SET(Z_INCLUDE_DIRNAME ${OPENJPEG_SOURCE_DIR}/thirdparty/include PARENT_SCOPE) set(Z_INCLUDE_DIRNAME ${OPENJPEG_SOURCE_DIR}/thirdparty/include PARENT_SCOPE)
SET(ZLIB_FOUND 1) set(ZLIB_FOUND 1)
ELSE (BUILD_THIRDPARTY) else(BUILD_THIRDPARTY)
# Try to find lib Z # Try to find lib Z
FIND_PACKAGE(ZLIB) find_package(ZLIB)
IF(ZLIB_FOUND) if(ZLIB_FOUND)
SET(Z_LIBNAME ${ZLIB_LIBRARIES} PARENT_SCOPE) set(Z_LIBNAME ${ZLIB_LIBRARIES} PARENT_SCOPE)
SET(Z_INCLUDE_DIRNAME ${ZLIB_INCLUDE_DIRS} PARENT_SCOPE) set(Z_INCLUDE_DIRNAME ${ZLIB_INCLUDE_DIRS} PARENT_SCOPE)
message(STATUS "Your system seems to have a Z lib available, we will use it to generate PNG lib") message(STATUS "Your system seems to have a Z lib available, we will use it to generate PNG lib")
# message(STATUS "DEBUG: ${ZLIB_INCLUDE_DIRS} vs ${ZLIB_INCLUDE_DIR}") # message(STATUS "DEBUG: ${ZLIB_INCLUDE_DIRS} vs ${ZLIB_INCLUDE_DIR}")
ELSE (ZLIB_FOUND) # not found else(ZLIB_FOUND) # not found
message(STATUS "Z lib not found, activate BUILD_THIRDPARTY if you want build it (necessary to build libPNG)") message(STATUS "Z lib not found, activate BUILD_THIRDPARTY if you want build it (necessary to build libPNG)")
ENDIF(ZLIB_FOUND) endif(ZLIB_FOUND)
ENDIF(BUILD_THIRDPARTY) endif(BUILD_THIRDPARTY)
#------------ #------------
# Try to find lib PNG (which depends on zlib) # Try to find lib PNG (which depends on zlib)
IF(BUILD_THIRDPARTY) if(BUILD_THIRDPARTY)
# Try to build it # Try to build it
message(STATUS "We will build PNG lib from thirdparty") message(STATUS "We will build PNG lib from thirdparty")
ADD_SUBDIRECTORY(libpng) add_subdirectory(libpng)
SET(OPJ_HAVE_PNG_H 1 PARENT_SCOPE) set(OPJ_HAVE_PNG_H 1 PARENT_SCOPE)
SET(OPJ_HAVE_LIBPNG 1 PARENT_SCOPE) set(OPJ_HAVE_LIBPNG 1 PARENT_SCOPE)
SET(PNG_LIBNAME png PARENT_SCOPE) set(PNG_LIBNAME png PARENT_SCOPE)
SET(PNG_INCLUDE_DIRNAME ${OPENJPEG_SOURCE_DIR}/thirdparty/libpng PARENT_SCOPE) set(PNG_INCLUDE_DIRNAME ${OPENJPEG_SOURCE_DIR}/thirdparty/libpng PARENT_SCOPE)
ELSE (BUILD_THIRDPARTY) else(BUILD_THIRDPARTY)
IF (ZLIB_FOUND) if(ZLIB_FOUND)
FIND_PACKAGE(PNG) find_package(PNG)
IF(PNG_FOUND) if(PNG_FOUND)
message(STATUS "Your system seems to have a PNG lib available, we will use it") message(STATUS "Your system seems to have a PNG lib available, we will use it")
SET(OPJ_HAVE_PNG_H 1 PARENT_SCOPE) set(OPJ_HAVE_PNG_H 1 PARENT_SCOPE)
SET(OPJ_HAVE_LIBPNG 1 PARENT_SCOPE) set(OPJ_HAVE_LIBPNG 1 PARENT_SCOPE)
SET(PNG_LIBNAME ${PNG_LIBRARIES} PARENT_SCOPE) set(PNG_LIBNAME ${PNG_LIBRARIES} PARENT_SCOPE)
SET(PNG_INCLUDE_DIRNAME ${PNG_PNG_INCLUDE_DIR} PARENT_SCOPE) set(PNG_INCLUDE_DIRNAME ${PNG_PNG_INCLUDE_DIR} PARENT_SCOPE)
ELSE(PNG_FOUND) # not found else(PNG_FOUND) # not found
SET(OPJ_HAVE_PNG_H 0 PARENT_SCOPE) set(OPJ_HAVE_PNG_H 0 PARENT_SCOPE)
SET(OPJ_HAVE_LIBPNG 0 PARENT_SCOPE) set(OPJ_HAVE_LIBPNG 0 PARENT_SCOPE)
message(STATUS "PNG lib not found, activate BUILD_THIRDPARTY if you want build it") message(STATUS "PNG lib not found, activate BUILD_THIRDPARTY if you want build it")
ENDIF(PNG_FOUND) endif(PNG_FOUND)
ENDIF (ZLIB_FOUND) endif(ZLIB_FOUND)
ENDIF(BUILD_THIRDPARTY) endif(BUILD_THIRDPARTY)
#------------ #------------
# Try to find lib TIFF # Try to find lib TIFF
IF(BUILD_THIRDPARTY) if(BUILD_THIRDPARTY)
# Try to build it # Try to build it
message(STATUS "We will build TIFF lib from thirdparty") message(STATUS "We will build TIFF lib from thirdparty")
ADD_SUBDIRECTORY(libtiff) add_subdirectory(libtiff)
SET(TIFF_LIBNAME tiff PARENT_SCOPE) set(TIFF_LIBNAME tiff PARENT_SCOPE)
SET(TIFF_INCLUDE_DIRNAME set(TIFF_INCLUDE_DIRNAME
${OPENJPEG_SOURCE_DIR}/thirdparty/libtiff ${OPENJPEG_SOURCE_DIR}/thirdparty/libtiff
${OPENJPEG_BINARY_DIR}/thirdparty/libtiff ${OPENJPEG_BINARY_DIR}/thirdparty/libtiff
PARENT_SCOPE) PARENT_SCOPE)
SET(OPJ_HAVE_TIFF_H 1 PARENT_SCOPE) set(OPJ_HAVE_TIFF_H 1 PARENT_SCOPE)
SET(OPJ_HAVE_LIBTIFF 1 PARENT_SCOPE) set(OPJ_HAVE_LIBTIFF 1 PARENT_SCOPE)
ELSE (BUILD_THIRDPARTY) else(BUILD_THIRDPARTY)
FIND_PACKAGE(TIFF) find_package(TIFF)
IF(TIFF_FOUND) if(TIFF_FOUND)
message(STATUS "Your system seems to have a TIFF lib available, we will use it") message(STATUS "Your system seems to have a TIFF lib available, we will use it")
SET(OPJ_HAVE_TIFF_H 1 PARENT_SCOPE) set(OPJ_HAVE_TIFF_H 1 PARENT_SCOPE)
SET(OPJ_HAVE_LIBTIFF 1 PARENT_SCOPE) set(OPJ_HAVE_LIBTIFF 1 PARENT_SCOPE)
SET(TIFF_LIBNAME ${TIFF_LIBRARIES} PARENT_SCOPE) set(TIFF_LIBNAME ${TIFF_LIBRARIES} PARENT_SCOPE)
SET(TIFF_INCLUDE_DIRNAME ${TIFF_INCLUDE_DIR} PARENT_SCOPE) set(TIFF_INCLUDE_DIRNAME ${TIFF_INCLUDE_DIR} PARENT_SCOPE)
ELSE (TIFF_FOUND) # not found else(TIFF_FOUND) # not found
SET(OPJ_HAVE_TIFF_H 0 PARENT_SCOPE) set(OPJ_HAVE_TIFF_H 0 PARENT_SCOPE)
SET(OPJ_HAVE_LIBTIFF 0 PARENT_SCOPE) set(OPJ_HAVE_LIBTIFF 0 PARENT_SCOPE)
message(STATUS "TIFF lib not found, activate BUILD_THIRDPARTY if you want build it") message(STATUS "TIFF lib not found, activate BUILD_THIRDPARTY if you want build it")
ENDIF(TIFF_FOUND) endif(TIFF_FOUND)
ENDIF(BUILD_THIRDPARTY) endif(BUILD_THIRDPARTY)
#------------ #------------
# Try to find lib LCMS2 (or by default LCMS) # Try to find lib LCMS2 (or by default LCMS)
SET(OPJ_HAVE_LCMS_H 0 PARENT_SCOPE) set(OPJ_HAVE_LCMS_H 0 PARENT_SCOPE)
SET(OPJ_HAVE_LIBLCMS 0 PARENT_SCOPE) set(OPJ_HAVE_LIBLCMS 0 PARENT_SCOPE)
IF( BUILD_THIRDPARTY) if( BUILD_THIRDPARTY)
# Try to build lcms2 # Try to build lcms2
message(STATUS "We will build LCMS2 lib from thirdparty") message(STATUS "We will build LCMS2 lib from thirdparty")
ADD_SUBDIRECTORY(liblcms2) add_subdirectory(liblcms2)
SET(LCMS_LIBNAME lcms2 PARENT_SCOPE) set(LCMS_LIBNAME lcms2 PARENT_SCOPE)
SET(LCMS_INCLUDE_DIRNAME ${OPENJPEG_SOURCE_DIR}/thirdparty/liblcms2/include PARENT_SCOPE) # set(LCMS_INCLUDE_DIRNAME ${OPENJPEG_SOURCE_DIR}/thirdparty/liblcms2/include PARENT_SCOPE) #
SET(OPJ_HAVE_LCMS2_H 1 PARENT_SCOPE) set(OPJ_HAVE_LCMS2_H 1 PARENT_SCOPE)
SET(OPJ_HAVE_LIBLCMS2 1 PARENT_SCOPE) set(OPJ_HAVE_LIBLCMS2 1 PARENT_SCOPE)
ELSE (BUILD_THIRDPARTY) else(BUILD_THIRDPARTY)
FIND_PACKAGE(LCMS2) find_package(LCMS2)
IF(LCMS2_FOUND) if(LCMS2_FOUND)
message(STATUS "Your system seems to have a LCMS2 lib available, we will use it") message(STATUS "Your system seems to have a LCMS2 lib available, we will use it")
SET(OPJ_HAVE_LCMS2_H 1 PARENT_SCOPE) set(OPJ_HAVE_LCMS2_H 1 PARENT_SCOPE)
SET(OPJ_HAVE_LIBLCMS2 1 PARENT_SCOPE) set(OPJ_HAVE_LIBLCMS2 1 PARENT_SCOPE)
SET(LCMS_LIBNAME ${LCMS2_LIBRARIES} PARENT_SCOPE) set(LCMS_LIBNAME ${LCMS2_LIBRARIES} PARENT_SCOPE)
SET(LCMS_INCLUDE_DIRNAME ${LCMS2_INCLUDE_DIRS} PARENT_SCOPE) set(LCMS_INCLUDE_DIRNAME ${LCMS2_INCLUDE_DIRS} PARENT_SCOPE)
ELSE (LCMS2_FOUND) # not found lcms2 else(LCMS2_FOUND) # not found lcms2
# try to find LCMS # try to find LCMS
FIND_PACKAGE(LCMS) find_package(LCMS)
IF(LCMS_FOUND) if(LCMS_FOUND)
message(STATUS "Your system seems to have a LCMS lib available, we will use it") message(STATUS "Your system seems to have a LCMS lib available, we will use it")
SET(OPJ_HAVE_LCMS_H 1 PARENT_SCOPE) set(OPJ_HAVE_LCMS_H 1 PARENT_SCOPE)
SET(OPJ_HAVE_LIBLCMS 1 PARENT_SCOPE) set(OPJ_HAVE_LIBLCMS 1 PARENT_SCOPE)
SET(LCMS_LIBNAME ${LCMS_LIBRARIES} PARENT_SCOPE) set(LCMS_LIBNAME ${LCMS_LIBRARIES} PARENT_SCOPE)
SET(LCMS_INCLUDE_DIRNAME ${LCMS_INCLUDE_DIRS} PARENT_SCOPE) set(LCMS_INCLUDE_DIRNAME ${LCMS_INCLUDE_DIRS} PARENT_SCOPE)
ELSE (LCMS_FOUND) # not found lcms else(LCMS_FOUND) # not found lcms
SET(OPJ_HAVE_LCMS2_H 0 PARENT_SCOPE) set(OPJ_HAVE_LCMS2_H 0 PARENT_SCOPE)
SET(OPJ_HAVE_LIBLCMS2 0 PARENT_SCOPE) set(OPJ_HAVE_LIBLCMS2 0 PARENT_SCOPE)
message(STATUS "LCMS2 or LCMS lib not found, activate BUILD_THIRDPARTY if you want build it") message(STATUS "LCMS2 or LCMS lib not found, activate BUILD_THIRDPARTY if you want build it")
ENDIF (LCMS_FOUND) endif(LCMS_FOUND)
ENDIF(LCMS2_FOUND) endif(LCMS2_FOUND)
ENDIF(BUILD_THIRDPARTY) endif(BUILD_THIRDPARTY)

View File

@ -1,19 +1,19 @@
PROJECT(liblcms2 C) project(liblcms2 C)
# #
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/include") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
# #
FILE(GLOB SRCS src/*.c) file(GLOB SRCS src/*.c)
FILE(GLOB HDRS include/*.h) file(GLOB HDRS include/*.h)
# #
SET(LIBTARGET "lcms2") set(LIBTARGET "lcms2")
# #
ADD_LIBRARY(${LIBTARGET} STATIC ${SRCS} ${HDRS}) add_library(${LIBTARGET} STATIC ${SRCS} ${HDRS})
# #
IF(MSVC) if(MSVC)
SET_TARGET_PROPERTIES(${LIBTARGET} PROPERTIES PREFIX "lib") set_target_properties(${LIBTARGET} PROPERTIES PREFIX "lib")
ENDIF(MSVC) endif(MSVC)
# #
SET_TARGET_PROPERTIES(${LIBTARGET} set_target_properties(${LIBTARGET}
PROPERTIES PROPERTIES
OUTPUT_NAME "${LIBTARGET}" OUTPUT_NAME "${LIBTARGET}"
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/thirdparty/lib) ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/thirdparty/lib)

View File

@ -1,28 +1,28 @@
PROJECT(libpng C) project(libpng C)
INCLUDE_DIRECTORIES( include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}"
${OPENJPEG_SOURCE_DIR}/thirdparty/include ${OPENJPEG_SOURCE_DIR}/thirdparty/include
) )
FILE(GLOB SRCS *.c) file(GLOB SRCS *.c)
FILE(GLOB HDRS *.h) file(GLOB HDRS *.h)
SET(EXT_HDRS set(EXT_HDRS
${OPENJPEG_SOURCE_DIR}/thirdparty/include/zlib.h ${OPENJPEG_SOURCE_DIR}/thirdparty/include/zlib.h
${OPENJPEG_SOURCE_DIR}/thirdparty/include/zconf.h ${OPENJPEG_SOURCE_DIR}/thirdparty/include/zconf.h
) )
# #
SET(LIBTARGET "png") set(LIBTARGET "png")
# #
ADD_LIBRARY(${LIBTARGET} STATIC ${SRCS} ${HDRS} ${EXT_HDRS}) add_library(${LIBTARGET} STATIC ${SRCS} ${HDRS} ${EXT_HDRS})
# #
IF(MSVC) if(MSVC)
SET_TARGET_PROPERTIES(${LIBTARGET} PROPERTIES PREFIX "lib") set_target_properties(${LIBTARGET} PROPERTIES PREFIX "lib")
ENDIF(MSVC) endif(MSVC)
# #
TARGET_LINK_LIBRARIES(${LIBTARGET} ${Z_LIBNAME} ${M_LIBRARY}) target_link_libraries(${LIBTARGET} ${Z_LIBNAME} ${M_LIBRARY})
# #
SET_TARGET_PROPERTIES(${LIBTARGET} set_target_properties(${LIBTARGET}
PROPERTIES PROPERTIES
OUTPUT_NAME "${LIBTARGET}" OUTPUT_NAME "${LIBTARGET}"
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/thirdparty/lib) ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/thirdparty/lib)

View File

@ -1,12 +1,12 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6) cmake_minimum_required(VERSION 2.6)
project(libtiff C) project(libtiff C)
# This convenient copy of libtiff does not support encapsulated zlib or jpeg # This convenient copy of libtiff does not support encapsulated zlib or jpeg
# stream. see ZIP_SUPPORT and JPEG_SUPPORT values # stream. see ZIP_SUPPORT and JPEG_SUPPORT values
INCLUDE_DIRECTORIES(BEFORE "${CMAKE_CURRENT_SOURCE_DIR}") include_directories(BEFORE "${CMAKE_CURRENT_SOURCE_DIR}")
INCLUDE_DIRECTORIES(BEFORE "${CMAKE_CURRENT_BINARY_DIR}") include_directories(BEFORE "${CMAKE_CURRENT_BINARY_DIR}")
SET(TARGET_FILES set(TARGET_FILES
t4.h t4.h
tiffiop.h tiffiop.h
tif_aux.c tif_aux.c
@ -53,16 +53,16 @@ SET(TARGET_FILES
uvcode.h uvcode.h
) )
IF(UNIX) if(UNIX)
SET(TARGET_FILES ${TARGET_FILES} tif_unix.c) set(TARGET_FILES ${TARGET_FILES} tif_unix.c)
# Large file support # Large file support
# This might not catch every possibility catered for by # This might not catch every possibility catered for by
# AC_SYS_LARGEFILE. # AC_SYS_LARGEFILE.
add_definitions(-D_FILE_OFFSET_BITS=64) add_definitions(-D_FILE_OFFSET_BITS=64)
set(_FILE_OFFSET_BITS 64) set(_FILE_OFFSET_BITS 64)
ELSE() else()
SET(TARGET_FILES ${TARGET_FILES} tif_win32.c) set(TARGET_FILES ${TARGET_FILES} tif_win32.c)
ENDIF() endif()
include(${CMAKE_ROOT}/Modules/TestBigEndian.cmake) include(${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
TEST_BIG_ENDIAN(WORDS_BIGENDIAN) TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
@ -151,7 +151,7 @@ int main(void) {
}" HAVE_SNPRINTF) }" HAVE_SNPRINTF)
if(NOT HAVE_SNPRINTF) if(NOT HAVE_SNPRINTF)
SET(TARGET_FILES ${TARGET_FILES} snprintf.c) set(TARGET_FILES ${TARGET_FILES} snprintf.c)
endif() endif()
include(CheckTypeSize) include(CheckTypeSize)
@ -250,28 +250,28 @@ CHECK_SYMBOL_EXISTS(lfind "search.h" HAVE_LFIND)
CHECK_SYMBOL_EXISTS(setmod "io.h" HAVE_SETMODE) CHECK_SYMBOL_EXISTS(setmod "io.h" HAVE_SETMODE)
# http://www.cmake.org/pipermail/cmake/2007-September/016285.html # http://www.cmake.org/pipermail/cmake/2007-September/016285.html
FOREACH(KEYWORD "inline" "__inline__" "__inline") foreach(KEYWORD "inline" "__inline__" "__inline")
IF(NOT DEFINED C_INLINE) if(NOT DEFINED C_INLINE)
TRY_COMPILE(C_HAS_${KEYWORD} "${CMAKE_CURRENT_BINARY_DIR}" try_compile(C_HAS_${KEYWORD} "${CMAKE_CURRENT_BINARY_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/test_inline.c" "${CMAKE_CURRENT_SOURCE_DIR}/test_inline.c"
COMPILE_DEFINITIONS "-Dinline=${KEYWORD}") COMPILE_DEFINITIONS "-Dinline=${KEYWORD}")
IF(C_HAS_${KEYWORD}) if(C_HAS_${KEYWORD})
SET(C_INLINE TRUE) set(C_INLINE TRUE)
SET(INLINE_KEYWORD "${KEYWORD}") set(INLINE_KEYWORD "${KEYWORD}")
ENDIF(C_HAS_${KEYWORD}) endif(C_HAS_${KEYWORD})
ENDIF(NOT DEFINED C_INLINE) endif(NOT DEFINED C_INLINE)
ENDFOREACH(KEYWORD) endforeach(KEYWORD)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tiffconf.h.cmake.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tiffconf.h.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/tiffconf.h @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/tiffconf.h @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tif_config.h.cmake.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tif_config.h.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/tif_config.h @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/tif_config.h @ONLY)
SET(LIBTARGET "tiff") set(LIBTARGET "tiff")
# #
ADD_LIBRARY(${LIBTARGET} STATIC ${TARGET_FILES}) add_library(${LIBTARGET} STATIC ${TARGET_FILES})
# #
SET_TARGET_PROPERTIES(${LIBTARGET} set_target_properties(${LIBTARGET}
PROPERTIES PROPERTIES
OUTPUT_NAME "${LIBTARGET}" OUTPUT_NAME "${LIBTARGET}"
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/thirdparty/lib ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/thirdparty/lib

View File

@ -1,14 +1,14 @@
#based on zlib-1.2.5/CMakeLists.txt #based on zlib-1.2.5/CMakeLists.txt
# #
cmake_minimum_required(VERSION 2.6) cmake_minimum_required(VERSION 2.6)
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON) set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
PROJECT(zlib C) project(zlib C)
INCLUDE(CheckTypeSize) include(CheckTypeSize)
INCLUDE(CheckFunctionExists) include(CheckFunctionExists)
INCLUDE(CheckIncludeFile) include(CheckIncludeFile)
INCLUDE(CheckCSourceCompiles) include(CheckCSourceCompiles)
CHECK_INCLUDE_FILE(sys/types.h HAVE_SYS_TYPES_H) CHECK_INCLUDE_FILE(sys/types.h HAVE_SYS_TYPES_H)
CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H) CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H)
@ -17,47 +17,47 @@ CHECK_INCLUDE_FILE(stddef.h HAVE_STDDEF_H)
# #
# Check to see if we have large file support # Check to see if we have large file support
# #
SET(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1) set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1)
# We add these other definitions here because CheckTypeSize.cmake # We add these other definitions here because CheckTypeSize.cmake
# in CMake 2.4.x does not automatically do so and we want # in CMake 2.4.x does not automatically do so and we want
# compatibility with CMake 2.4.x. # compatibility with CMake 2.4.x.
IF(HAVE_SYS_TYPES_H) if(HAVE_SYS_TYPES_H)
LIST(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H) list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H)
ENDIF() endif()
IF(HAVE_STDINT_H) if(HAVE_STDINT_H)
LIST(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H) list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H)
ENDIF() endif()
IF(HAVE_STDDEF_H) if(HAVE_STDDEF_H)
LIST(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H) list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H)
ENDIF() endif()
CHECK_TYPE_SIZE(off64_t OFF64_T) CHECK_TYPE_SIZE(off64_t OFF64_T)
IF(HAVE_OFF64_T) if(HAVE_OFF64_T)
ADD_DEFINITIONS(-D_LARGEFILE64_SOURCE=1) add_definitions(-D_LARGEFILE64_SOURCE=1)
ENDIF() endif()
SET(CMAKE_REQUIRED_DEFINITIONS) # clear variable set(CMAKE_REQUIRED_DEFINITIONS) # clear variable
# #
# Check for fseeko # Check for fseeko
# #
CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO)
IF(NOT HAVE_FSEEKO) if(NOT HAVE_FSEEKO)
ADD_DEFINITIONS(-DNO_FSEEKO) add_definitions(-DNO_FSEEKO)
ENDIF() endif()
# #
# Check for unistd.h # Check for unistd.h
# #
CHECK_INCLUDE_FILE(unistd.h Z_HAVE_UNISTD_H) CHECK_INCLUDE_FILE(unistd.h Z_HAVE_UNISTD_H)
INCLUDE_DIRECTORIES( include_directories(
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
${OPENJPEG_SOURCE_DIR}/thirdparty/include ${OPENJPEG_SOURCE_DIR}/thirdparty/include
) )
# #
SET(EXT_HDRS set(EXT_HDRS
${OPENJPEG_SOURCE_DIR}/thirdparty/include/zlib.h ${OPENJPEG_SOURCE_DIR}/thirdparty/include/zlib.h
${OPENJPEG_SOURCE_DIR}/thirdparty/include/zconf.h ${OPENJPEG_SOURCE_DIR}/thirdparty/include/zconf.h
) )
SET(HDRS set(HDRS
crc32.h crc32.h
deflate.h deflate.h
gzguts.h gzguts.h
@ -68,7 +68,7 @@ SET(HDRS
trees.h trees.h
zutil.h zutil.h
) )
SET(SRCS set(SRCS
adler32.c adler32.c
compress.c compress.c
crc32.c crc32.c
@ -86,15 +86,15 @@ SET(SRCS
zutil.c zutil.c
) )
SET(LIBTARGET "z") set(LIBTARGET "z")
# #
ADD_LIBRARY(${LIBTARGET} STATIC ${SRCS} ${EXT_HDRS} ${HDRS}) add_library(${LIBTARGET} STATIC ${SRCS} ${EXT_HDRS} ${HDRS})
# #
IF(MSVC) if(MSVC)
SET_TARGET_PROPERTIES(${LIBTARGET} PROPERTIES PREFIX "lib") set_target_properties(${LIBTARGET} PROPERTIES PREFIX "lib")
ENDIF(MSVC) endif(MSVC)
SET_TARGET_PROPERTIES(${LIBTARGET} set_target_properties(${LIBTARGET}
PROPERTIES PROPERTIES
OUTPUT_NAME "${LIBTARGET}" OUTPUT_NAME "${LIBTARGET}"
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/thirdparty/lib ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/thirdparty/lib

View File

@ -69,8 +69,8 @@ if("$ENV{CC}" MATCHES ".*mingw.*")
endif() endif()
if(NOT "$ENV{OPJ_CI_SKIP_TESTS}" STREQUAL "1") if(NOT "$ENV{OPJ_CI_SKIP_TESTS}" STREQUAL "1")
# To execute part of the encoding test suite, kakadu binaries are needed to decode encoded image and compare # To execute part of the encoding test suite, kakadu binaries are needed to decode encoded image and compare
# it to the baseline. Kakadu binaries are freely available for non-commercial purposes # it to the baseline. Kakadu binaries are freely available for non-commercial purposes
# at http://www.kakadusoftware.com. # at http://www.kakadusoftware.com.
# Here's the copyright notice from kakadu: # Here's the copyright notice from kakadu:
# Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney. # Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney.
@ -91,7 +91,7 @@ else()
set(BUILD_TESTING "FALSE") set(BUILD_TESTING "FALSE")
endif(NOT "$ENV{OPJ_CI_SKIP_TESTS}" STREQUAL "1") endif(NOT "$ENV{OPJ_CI_SKIP_TESTS}" STREQUAL "1")
# Options # Options
set( CACHE_CONTENTS " set( CACHE_CONTENTS "
# Build kind # Build kind
@ -103,19 +103,19 @@ CMAKE_C_FLAGS:STRING= ${CCFLAGS_ARCH} ${CCFLAGS_WARNING}
# Use to activate the test suite # Use to activate the test suite
BUILD_TESTING:BOOL=${BUILD_TESTING} BUILD_TESTING:BOOL=${BUILD_TESTING}
# Build Thirdparty, useful but not required for test suite # Build Thirdparty, useful but not required for test suite
BUILD_THIRDPARTY:BOOL=TRUE BUILD_THIRDPARTY:BOOL=TRUE
# JPEG2000 test files are available with git clone https://github.com/uclouvain/openjpeg-data.git # JPEG2000 test files are available with git clone https://github.com/uclouvain/openjpeg-data.git
OPJ_DATA_ROOT:PATH=$ENV{PWD}/data OPJ_DATA_ROOT:PATH=$ENV{PWD}/data
# jpylyzer is available with on GitHub: https://github.com/openpreserve/jpylyzer # jpylyzer is available with on GitHub: https://github.com/openpreserve/jpylyzer
JPYLYZER_EXECUTABLE=$ENV{PWD}/jpylyzer/jpylyzer.${JPYLYZER_EXT} JPYLYZER_EXECUTABLE=$ENV{PWD}/jpylyzer/jpylyzer.${JPYLYZER_EXT}
" ) " )
#--------------------- #---------------------
#1. openjpeg specific: #1. openjpeg specific:
set( CTEST_PROJECT_NAME "OPENJPEG" ) set( CTEST_PROJECT_NAME "OPENJPEG" )
if(NOT EXISTS $ENV{OPJ_SOURCE_DIR}) if(NOT EXISTS $ENV{OPJ_SOURCE_DIR})
message(FATAL_ERROR "OPJ_SOURCE_DIR not defined or does not exist:$ENV{OPJ_SOURCE_DIR}") message(FATAL_ERROR "OPJ_SOURCE_DIR not defined or does not exist:$ENV{OPJ_SOURCE_DIR}")

View File

@ -1,2 +1,2 @@
# #
add_subdirectory(openjp2) add_subdirectory(openjp2)