]> granicus.if.org Git - openjpeg/commitdiff
Correct CMake version requirements
authormayeut <mayeut@users.noreply.github.com>
Tue, 1 Sep 2015 18:43:43 +0000 (20:43 +0200)
committermayeut <mayeut@users.noreply.github.com>
Tue, 1 Sep 2015 18:43:43 +0000 (20:43 +0200)
Update uclouvain/openjpeg#488

src/lib/openjp2/CMakeLists.txt
src/lib/openjp3d/CMakeLists.txt
src/lib/openjpip/CMakeLists.txt
src/lib/openjpwl/CMakeLists.txt
src/lib/openmj2/CMakeLists.txt
tests/nonregression/CMakeLists.txt

index 4a865e5d44ceaf47b23b0f8537a9b6d84ff958c9..3129bf5378ed410cadfd14317bf132a89c9b4e4d 100644 (file)
@@ -85,7 +85,9 @@ if(UNIX)
   target_link_libraries(${OPENJPEG_LIBRARY_NAME} m)
 endif()
 set_target_properties(${OPENJPEG_LIBRARY_NAME} PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
-target_compile_options(${OPENJPEG_LIBRARY_NAME} PRIVATE ${OPENJPEG_LIBRARY_COMPILE_OPTIONS})
+if(${CMAKE_VERSION} VERSION_GREATER "2.8.11")
+  target_compile_options(${OPENJPEG_LIBRARY_NAME} PRIVATE ${OPENJPEG_LIBRARY_COMPILE_OPTIONS})
+endif()
 
 # Install library
 install(TARGETS ${OPENJPEG_LIBRARY_NAME}
index df7c9be2a74572a37bc276a6eb1fe2348da8f409..0bbafea3ddc8beaddd6b45e74508e1aaaae3e6d4 100644 (file)
@@ -27,7 +27,9 @@ if(UNIX)
   target_link_libraries(${OPENJP3D_LIBRARY_NAME} m)
 endif()
 set_target_properties(${OPENJP3D_LIBRARY_NAME} PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
-target_compile_options(${OPENJP3D_LIBRARY_NAME} PRIVATE ${OPENJPEG_LIBRARY_COMPILE_OPTIONS})
+if(${CMAKE_VERSION} VERSION_GREATER "2.8.11")
+  target_compile_options(${OPENJP3D_LIBRARY_NAME} PRIVATE ${OPENJPEG_LIBRARY_COMPILE_OPTIONS})
+endif()
 
 # Install library
 install(TARGETS ${OPENJP3D_LIBRARY_NAME}
index 28e8259d930ab085d0d480c0a6bc1a3e1b249854..858a109536e7af998d46135c49d3e622267c7a21 100644 (file)
@@ -61,7 +61,9 @@ endif()
 add_library(openjpip ${OPENJPIP_SRCS} ${LOCAL_SRCS})
 set_target_properties(openjpip
   PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
-target_compile_options(openjpip PRIVATE ${OPENJPEG_LIBRARY_COMPILE_OPTIONS})
+if(${CMAKE_VERSION} VERSION_GREATER "2.8.11")
+  target_compile_options(openjpip PRIVATE ${OPENJPEG_LIBRARY_COMPILE_OPTIONS})
+endif()
 target_link_libraries(openjpip ${OPENJPEG_LIBRARY_NAME})
 if(WIN32)
   # add Winsock on windows+mingw
index 00773db1caa6eb47c7431a4a21b53703bdd68ac0..9e2ace75ae1241df3d5baf5df0dc08bf55ab90b9 100644 (file)
@@ -51,7 +51,9 @@ if(UNIX)
 endif()
 set_target_properties(openjpwl
   PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
-target_compile_options(openjpwl PRIVATE ${OPENJPEG_LIBRARY_COMPILE_OPTIONS})
+if(${CMAKE_VERSION} VERSION_GREATER "2.8.11")
+  target_compile_options(openjpwl PRIVATE ${OPENJPEG_LIBRARY_COMPILE_OPTIONS})
+endif()
 
 # Install library
 install(TARGETS openjpwl
index 0656b2524bef504bea6922ff701393b49f35c2fa..dbb7e7ce1519af16037d955289977de1fa94f6f7 100644 (file)
@@ -46,7 +46,9 @@ if(UNIX)
   target_link_libraries(${OPENMJ2_LIBRARY_NAME} m)
 endif()
 set_target_properties(${OPENMJ2_LIBRARY_NAME} PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
-target_compile_options(${OPENMJ2_LIBRARY_NAME} PRIVATE ${OPENJPEG_LIBRARY_COMPILE_OPTIONS})
+if(${CMAKE_VERSION} VERSION_GREATER "2.8.11")
+  target_compile_options(${OPENMJ2_LIBRARY_NAME} PRIVATE ${OPENJPEG_LIBRARY_COMPILE_OPTIONS})
+endif()
 
 # Install library
 install(TARGETS ${OPENMJ2_LIBRARY_NAME}
index ab90f03b0b17794bbf6bcd04dcc0b202318ff725..2527f8cb5907bb3845ceda44d99ae8db93729144 100644 (file)
@@ -1,5 +1,7 @@
 # NON-REGRESSION TESTS ON THIS DATASET LOCATED ${OPJ_DATA_ROOT}/input/nonregression
 
+cmake_minimum_required(VERSION 2.8.7)
+
 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Temporary)
 
 set(TEMP ${CMAKE_CURRENT_BINARY_DIR}/Temporary)