mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-12 01:30:49 +01:00
Use NOT VERSION_LESS for CMake 3.6
This commit is contained in:
parent
ea45158d7d
commit
abafdb4b9e
@ -3,7 +3,7 @@ if(NOT WIN32)
|
|||||||
find_package(Git QUIET)
|
find_package(Git QUIET)
|
||||||
find_package(Subversion QUIET)
|
find_package(Subversion QUIET)
|
||||||
# no FetchContent until 3.11
|
# no FetchContent until 3.11
|
||||||
if((${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.11.0") AND (Git_FOUND OR Subversion_FOUND))
|
if((NOT ${CMAKE_VERSION} VERSION_LESS "3.11.0") AND (Git_FOUND OR Subversion_FOUND))
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
set(FetchContent_INCLUDED TRUE)
|
set(FetchContent_INCLUDED TRUE)
|
||||||
endif()
|
endif()
|
||||||
@ -45,7 +45,7 @@ function(FetchDependency name)
|
|||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "The provided path to ${ARGS_DIR} does not exist (Use ${name}_PATH)")
|
message(FATAL_ERROR "The provided path to ${ARGS_DIR} does not exist (Use ${name}_PATH)")
|
||||||
endif()
|
endif()
|
||||||
elseif(FetchContent_INCLUDED AND ((Subversion_FOUND AND ARGS_SVN_REPOSITORY) OR (Git_FOUND AND ARGS_GIT_REPOSITORY) OR (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.18.0" AND ARGS_FILE_DOWNLOAD)))
|
elseif(FetchContent_INCLUDED AND ((Subversion_FOUND AND ARGS_SVN_REPOSITORY) OR (Git_FOUND AND ARGS_GIT_REPOSITORY) OR ((NOT ${CMAKE_VERSION} VERSION_LESS "3.18.0") AND ARGS_FILE_DOWNLOAD)))
|
||||||
set(${name}_PATH ${VGM_SOURCE_DIR}/dependencies/${ARGS_DIR})
|
set(${name}_PATH ${VGM_SOURCE_DIR}/dependencies/${ARGS_DIR})
|
||||||
set(${name}_PATH ${${name}_PATH} PARENT_SCOPE)
|
set(${name}_PATH ${${name}_PATH} PARENT_SCOPE)
|
||||||
set(${name}_SOURCE "(download)" PARENT_SCOPE)
|
set(${name}_SOURCE "(download)" PARENT_SCOPE)
|
||||||
@ -87,7 +87,7 @@ function(FetchDependency name)
|
|||||||
endif()
|
endif()
|
||||||
break()
|
break()
|
||||||
|
|
||||||
elseif(CURRENT_FETCH STREQUAL "file" AND ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.18.0" AND ARGS_FILE_DOWNLOAD)
|
elseif(CURRENT_FETCH STREQUAL "file" AND (NOT ${CMAKE_VERSION} VERSION_LESS "3.18.0") AND ARGS_FILE_DOWNLOAD)
|
||||||
# no ARCHIVE_EXTRACT until 3.18
|
# no ARCHIVE_EXTRACT until 3.18
|
||||||
string(REGEX REPLACE ".*/" "" FILE ${ARGS_FILE_DOWNLOAD})
|
string(REGEX REPLACE ".*/" "" FILE ${ARGS_FILE_DOWNLOAD})
|
||||||
if(NOT EXISTS ${${name}_PATH}/${FILE})
|
if(NOT EXISTS ${${name}_PATH}/${FILE})
|
||||||
|
Loading…
Reference in New Issue
Block a user