Changed cmake version test to allow for cmake 2.8.11.x

This commit is contained in:
Andrew Murray 2017-11-14 21:45:09 +11:00
parent d9f8f7ba9a
commit 157a3d8408
6 changed files with 6 additions and 6 deletions

View File

@ -44,7 +44,7 @@ endif()
# Loop over all executables: # Loop over all executables:
foreach(exe opj_decompress opj_compress opj_dump) foreach(exe opj_decompress opj_compress opj_dump)
add_executable(${exe} ${exe}.c ${common_SRCS}) add_executable(${exe} ${exe}.c ${common_SRCS})
if(${CMAKE_VERSION} VERSION_GREATER "2.8.11") if(NOT ${CMAKE_VERSION} VERSION_LESS "2.8.12")
target_compile_options(${exe} PRIVATE ${OPENJP2_COMPILE_OPTIONS}) target_compile_options(${exe} PRIVATE ${OPENJP2_COMPILE_OPTIONS})
endif() endif()
target_link_libraries(${exe} ${OPENJPEG_LIBRARY_NAME} target_link_libraries(${exe} ${OPENJPEG_LIBRARY_NAME}

View File

@ -107,7 +107,7 @@ if(UNIX)
target_link_libraries(${OPENJPEG_LIBRARY_NAME} m) target_link_libraries(${OPENJPEG_LIBRARY_NAME} m)
endif() endif()
set_target_properties(${OPENJPEG_LIBRARY_NAME} PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES}) set_target_properties(${OPENJPEG_LIBRARY_NAME} PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
if(${CMAKE_VERSION} VERSION_GREATER "2.8.11") if(NOT ${CMAKE_VERSION} VERSION_LESS "2.8.12")
target_compile_options(${OPENJPEG_LIBRARY_NAME} PRIVATE ${OPENJP2_COMPILE_OPTIONS}) target_compile_options(${OPENJPEG_LIBRARY_NAME} PRIVATE ${OPENJP2_COMPILE_OPTIONS})
endif() endif()

View File

@ -27,7 +27,7 @@ if(UNIX)
target_link_libraries(${OPENJP3D_LIBRARY_NAME} m) target_link_libraries(${OPENJP3D_LIBRARY_NAME} m)
endif() endif()
set_target_properties(${OPENJP3D_LIBRARY_NAME} PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES}) set_target_properties(${OPENJP3D_LIBRARY_NAME} PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
if(${CMAKE_VERSION} VERSION_GREATER "2.8.11") if(NOT ${CMAKE_VERSION} VERSION_LESS "2.8.12")
target_compile_options(${OPENJP3D_LIBRARY_NAME} PRIVATE ${OPENJPEG_LIBRARY_COMPILE_OPTIONS}) target_compile_options(${OPENJP3D_LIBRARY_NAME} PRIVATE ${OPENJPEG_LIBRARY_COMPILE_OPTIONS})
endif() endif()

View File

@ -62,7 +62,7 @@ endif()
add_library(openjpip ${OPENJPIP_SRCS} ${LOCAL_SRCS}) add_library(openjpip ${OPENJPIP_SRCS} ${LOCAL_SRCS})
set_target_properties(openjpip set_target_properties(openjpip
PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES}) 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}) target_compile_options(openjpip PRIVATE ${OPENJPEG_LIBRARY_COMPILE_OPTIONS})
endif() endif()
target_link_libraries(openjpip ${OPENJPEG_LIBRARY_NAME}) target_link_libraries(openjpip ${OPENJPEG_LIBRARY_NAME})

View File

@ -51,7 +51,7 @@ if(UNIX)
endif() endif()
set_target_properties(openjpwl set_target_properties(openjpwl
PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES}) PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
if(${CMAKE_VERSION} VERSION_GREATER "2.8.11") if(NOT ${CMAKE_VERSION} VERSION_LESS "2.8.12")
target_compile_options(openjpwl PRIVATE ${OPENJPEG_LIBRARY_COMPILE_OPTIONS}) target_compile_options(openjpwl PRIVATE ${OPENJPEG_LIBRARY_COMPILE_OPTIONS})
endif() endif()

View File

@ -46,7 +46,7 @@ if(UNIX)
target_link_libraries(${OPENMJ2_LIBRARY_NAME} m) target_link_libraries(${OPENMJ2_LIBRARY_NAME} m)
endif() endif()
set_target_properties(${OPENMJ2_LIBRARY_NAME} PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES}) set_target_properties(${OPENMJ2_LIBRARY_NAME} PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
if(${CMAKE_VERSION} VERSION_GREATER "2.8.11") if(NOT ${CMAKE_VERSION} VERSION_LESS "2.8.12")
target_compile_options(${OPENMJ2_LIBRARY_NAME} PRIVATE ${OPENJPEG_LIBRARY_COMPILE_OPTIONS}) target_compile_options(${OPENMJ2_LIBRARY_NAME} PRIVATE ${OPENJPEG_LIBRARY_COMPILE_OPTIONS})
endif() endif()