SOVERSION "${OPENJPEG_VERSION_MAJOR}"
)
-
+# --------------------------------------------------------------------------
# Path to additional CMake modules
SET(CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/CMake
${CMAKE_MODULE_PATH})
+# --------------------------------------------------------------------------
# On Visual Studio 8 MS deprecated C. This removes all 1.276E1265 security
# warnings
IF(WIN32)
#-----------------------------------------------------------------------------
# Test for some required system information.
+# For example this macro test the endianness (CMAKE_WORDS_BIGENDIAN)
INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityC.cmake)
#-----------------------------------------------------------------------------
/* ----------------------------------------------------------------------- */
#if defined(OPJ_BIG_ENDIAN)
- #if !defined(OPJ_LITTLE_ENDIAN)
- #define opj_write_bytes opj_write_bytes_BE
- #define opj_read_bytes opj_read_bytes_BE
- #define opj_write_double opj_write_double_BE
- #define opj_read_double opj_read_double_BE
- #define opj_write_float opj_write_float_BE
- #define opj_read_float opj_read_float_BE
- #else
- #error "Either BIG_ENDIAN or LITTLE_ENDIAN must be #defined, but not both."
- #endif
+ #define opj_write_bytes opj_write_bytes_BE
+ #define opj_read_bytes opj_read_bytes_BE
+ #define opj_write_double opj_write_double_BE
+ #define opj_read_double opj_read_double_BE
+ #define opj_write_float opj_write_float_BE
+ #define opj_read_float opj_read_float_BE
#else
- #if defined(OPJ_LITTLE_ENDIAN)
- #define opj_write_bytes opj_write_bytes_LE
- #define opj_read_bytes opj_read_bytes_LE
- #define opj_write_double opj_write_double_LE
- #define opj_read_double opj_read_double_LE
- #define opj_write_float opj_write_float_LE
- #define opj_read_float opj_read_float_LE
- #else
- #error "Either BIG_ENDIAN or LITTLE_ENDIAN must be #defined, but not none."
- #endif
+ #define opj_write_bytes opj_write_bytes_LE
+ #define opj_read_bytes opj_read_bytes_LE
+ #define opj_write_double opj_write_double_LE
+ #define opj_read_double opj_read_double_LE
+ #define opj_write_float opj_write_float_LE
+ #define opj_read_float opj_read_float_LE
#endif
#cmakedefine HAVE_LCMS1_H @HAVE_LCMS1_H@
#cmakedefine HAVE_LCMS2_H @HAVE_LCMS2_H@
-#cmakedefine CMAKE_WORDS_BIGENDIAN
-#ifdef CMAKE_WORDS_BIGENDIAN
- #define OPJ_BIG_ENDIAN
-#else
- #define OPJ_LITTLE_ENDIAN
-#endif
+#cmakedefine OPJ_BIG_ENDIAN @CMAKE_WORDS_BIGENDIAN@
\ No newline at end of file