diff --git a/build_tools/cmake/CMakeLists.txt b/build_tools/cmake/CMakeLists.txt index e68e8f0..3163c8a 100644 --- a/build_tools/cmake/CMakeLists.txt +++ b/build_tools/cmake/CMakeLists.txt @@ -15,7 +15,7 @@ endif() #string(TOLOWER ${OPENJPEG_NAMESPACE} OPENJPEG_LIBRARY_NAME) set(OPENJPEG_LIBRARY_NAME openjp2) -project(${OPENJPEG_NAMESPACE}) +project(${OPENJPEG_NAMESPACE} C) # Do full dependency headers. include_regular_expression("^.*$") @@ -23,8 +23,8 @@ include_regular_expression("^.*$") #----------------------------------------------------------------------------- # OPENJPEG version number, useful for packaging and doxygen doc: set(OPENJPEG_VERSION_MAJOR 2) -set(OPENJPEG_VERSION_MINOR 3) -set(OPENJPEG_VERSION_BUILD 1) +set(OPENJPEG_VERSION_MINOR 5) +set(OPENJPEG_VERSION_BUILD 0) set(OPENJPEG_VERSION "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}") set(PACKAGE_VERSION @@ -36,7 +36,40 @@ endif(NOT OPENJPEG_SOVERSION) set(OPENJPEG_LIBRARY_PROPERTIES VERSION "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}" SOVERSION "${OPENJPEG_SOVERSION}" - ) +) + +# -------------------------------------------------------------------------- +# Path to additional CMake modules +set(CMAKE_MODULE_PATH + ${${OPENJPEG_NAMESPACE}_SOURCE_DIR}/cmake + ${CMAKE_MODULE_PATH}) + +# -------------------------------------------------------------------------- +# On Visual Studio 8 MS deprecated C. This removes all 1.276E1265 security +# warnings +if(WIN32) + if(NOT BORLAND) + if(NOT CYGWIN) + if(NOT MINGW) + if(NOT ITK_ENABLE_VISUAL_STUDIO_DEPRECATED_C_WARNINGS) + add_definitions( + -D_CRT_FAR_MAPPINGS_NO_DEPRECATE + -D_CRT_IS_WCTYPE_NO_DEPRECATE + -D_CRT_MANAGED_FP_NO_DEPRECATE + -D_CRT_NONSTDC_NO_DEPRECATE + -D_CRT_SECURE_NO_DEPRECATE + -D_CRT_SECURE_NO_DEPRECATE_GLOBALS + -D_CRT_SETERRORMODE_BEEP_SLEEP_NO_DEPRECATE + -D_CRT_TIME_FUNCTIONS_NO_DEPRECATE + -D_CRT_VCCLRIT_NO_DEPRECATE + -D_SCL_SECURE_NO_DEPRECATE + ) + endif() + endif() + endif() + endif() +endif() + # -------------------------------------------------------------------------- # Install directories @@ -46,22 +79,21 @@ endif() set(OPENJPEG_INSTALL_PACKAGE_DIR "../interface") -# -------------------------------------------------------------------------- -# Path to additional CMake modules -set(CMAKE_MODULE_PATH - ${${OPENJPEG_NAMESPACE}_SOURCE_DIR}/cmake - ${CMAKE_MODULE_PATH}) - set(OPENJPEG_INSTALL_INCLUDE_DIR "../interface" ) -option(BUILD_JPIP "Build the JPIP library and executables." OFF) +option(BUILD_JPWL off) +option(BUILD_MJ2 off) +option(BUILD_JPIP off) +option(BUILD_JP3D off) #----------------------------------------------------------------------------- # Big endian test: +if (NOT EMSCRIPTEN) include (${CMAKE_ROOT}/Modules/TestBigEndian.cmake) TEST_BIG_ENDIAN(OPJ_BIG_ENDIAN) +endif() #----------------------------------------------------------------------------- diff --git a/openjpeg/src/openjpeg b/openjpeg/src/openjpeg index 37ac30c..a589155 160000 --- a/openjpeg/src/openjpeg +++ b/openjpeg/src/openjpeg @@ -1 +1 @@ -Subproject commit 37ac30ceff6640bbab502388c5e0fa0bff23f505 +Subproject commit a5891555eb49ed7cc26b2901ea680acda136d811 diff --git a/setup.py b/setup.py index b939cdc..cad181d 100644 --- a/setup.py +++ b/setup.py @@ -76,7 +76,7 @@ def setup_oj(): setup_oj() # Compiler and linker arguments -extra_compile_args = [] +extra_compile_args = ["-DOPJ_STATIC"] extra_link_args = [] # Maybe use cythonize instead