Changed cmake version test to allow for cmake 2.8.11.x
[openjpeg.git] / src / lib / openjpip / CMakeLists.txt
index 858a109536e7af998d46135c49d3e622267c7a21..b3cb8ce88d59ae6f547f91c61aee27b681c228a2 100644 (file)
@@ -36,6 +36,7 @@ set(OPENJPIP_SRCS
   ${CMAKE_CURRENT_SOURCE_DIR}/session_manager.c
   ${CMAKE_CURRENT_SOURCE_DIR}/jpip_parser.c
   ${CMAKE_CURRENT_SOURCE_DIR}/sock_manager.c
+  ${OPENJPEG_SOURCE_DIR}/src/lib/openjp2/opj_malloc.c
   )
 
 set(SERVER_SRCS
@@ -61,7 +62,7 @@ endif()
 add_library(openjpip ${OPENJPIP_SRCS} ${LOCAL_SRCS})
 set_target_properties(openjpip
   PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
-if(${CMAKE_VERSION} VERSION_GREATER "2.8.11")
+if(NOT ${CMAKE_VERSION} VERSION_LESS "2.8.12")
   target_compile_options(openjpip PRIVATE ${OPENJPEG_LIBRARY_COMPILE_OPTIONS})
 endif()
 target_link_libraries(openjpip ${OPENJPEG_LIBRARY_NAME})