3rdParty-devel: Limit warnings to Visual Studio

These warnings are not relevant for other CMake generators, such as
"Unix Makefiles".


git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9564 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: c55b1096df21d5ea77037c61ef967865bc6878d4
Former-commit-id: 7c5a6de53b4fddf313acf7dd693c299f5b5c79c3
This commit is contained in:
xavi92 2024-10-27 07:42:19 +00:00
parent c85eddfd1f
commit 4beaf17b44
2 changed files with 14 additions and 6 deletions

View file

@ -395,8 +395,10 @@ if(OPTION_EXPAT)
URL_HASH ${EXPAT_HASH} URL_HASH ${EXPAT_HASH}
CMAKE_ARGS ${EXPAT_ARGS}) CMAKE_ARGS ${EXPAT_ARGS})
else() else()
message(WARNING "expat versions newer than 2.2.10 need Visual Studio 2017") if(CMAKE_GENERATOR MATCHES "Visual Studio")
message(WARNING "expat no longer officially supports Visual Studio 2015 and older") message(WARNING "expat versions newer than 2.2.10 need Visual Studio 2017")
message(WARNING "expat no longer officially supports Visual Studio 2015 and older")
endif()
#disable building unneeded sub projects (they failed with VS2008) #disable building unneeded sub projects (they failed with VS2008)
set(EXPAT_LEGACY_ARGS ${EXTERNALS_CMAKE_ARGS} -DEXPAT_BUILD_TESTS=off -DEXPAT_BUILD_EXAMPLES=off -DEXPAT_BUILD_TOOLS=off -DCMAKE_DEBUG_POSTFIX='') set(EXPAT_LEGACY_ARGS ${EXTERNALS_CMAKE_ARGS} -DEXPAT_BUILD_TESTS=off -DEXPAT_BUILD_EXAMPLES=off -DEXPAT_BUILD_TOOLS=off -DCMAKE_DEBUG_POSTFIX='')
ExternalProject_Add(${EXPAT_LEGACY_PROJECT} ExternalProject_Add(${EXPAT_LEGACY_PROJECT}
@ -464,7 +466,9 @@ if(OPTION_FREETYPE)
# Set FREETYPE_PROJECT to empty string, because we will use FREETYPE_LEGACY_PROJECT, # Set FREETYPE_PROJECT to empty string, because we will use FREETYPE_LEGACY_PROJECT,
# OpenScenegraph DEPENDS on freetype, so only one can be defined # OpenScenegraph DEPENDS on freetype, so only one can be defined
set(FREETYPE_PROJECT ) set(FREETYPE_PROJECT )
message(WARNING "freetype versions newer than 2.10.4 need Visual Studio 2013 or newer") if(CMAKE_GENERATOR MATCHES "Visual Studio")
message(WARNING "freetype versions newer than 2.10.4 need Visual Studio 2013 or newer")
endif()
set(FREETYPE_LEGACY_ARGS ${EXTERNALS_CMAKE_ARGS} -DBUILD_SHARED_LIBS:BOOL=false set(FREETYPE_LEGACY_ARGS ${EXTERNALS_CMAKE_ARGS} -DBUILD_SHARED_LIBS:BOOL=false
-DDISABLE_FORCE_DEBUG_POSTFIX:BOOL=true -DDISABLE_FORCE_DEBUG_POSTFIX:BOOL=true
-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE

View file

@ -66,15 +66,19 @@ set(OPENAL_HASH SHA256=dfddf3a1f61059853c625b7bb03de8433b455f2f79f89548cbcbd5edc
# https://github.com/kcat/openal-soft/releases/tag/1.23.1 # https://github.com/kcat/openal-soft/releases/tag/1.23.1
# https://github.com/kcat/openal-soft/archive/refs/tags/1.23.1.tar.gz # https://github.com/kcat/openal-soft/archive/refs/tags/1.23.1.tar.gz
message(WARNING "openal-soft versions newer than 1.19.1 need Visual Studio 2017 and CMAKE_SYSTEM_VERSION >= 10") if(CMAKE_GENERATOR MATCHES "Visual Studio")
message(WARNING "openal-soft versions newer than 1.19.1 need Visual Studio 2017 and CMAKE_SYSTEM_VERSION >= 10")
endif()
set(OPENAL_C11_VERSION 1.19.1) set(OPENAL_C11_VERSION 1.19.1)
set(OPENAL_C11_PROJECT openal-soft-${OPENAL_C11_VERSION}) set(OPENAL_C11_PROJECT openal-soft-${OPENAL_C11_VERSION})
set(OPENAL_C11_FILE ${OPENAL_C11_PROJECT}.tar.gz) set(OPENAL_C11_FILE ${OPENAL_C11_PROJECT}.tar.gz)
set(OPENAL_C11_URL https://github.com/kcat/openal-soft/archive/refs/tags/${OPENAL_C11_FILE}) set(OPENAL_C11_URL https://github.com/kcat/openal-soft/archive/refs/tags/${OPENAL_C11_FILE})
set(OPENAL_C11_HASH SHA256=9f3536ab2bb7781dbafabc6a61e0b34b17edd16bd6c2eaf2ae71bc63078f98c7) set(OPENAL_C11_HASH SHA256=9f3536ab2bb7781dbafabc6a61e0b34b17edd16bd6c2eaf2ae71bc63078f98c7)
message(STATUS "openal-soft versions newer than 1.18.2 need Visual Studio 2015 or newer") if(CMAKE_GENERATOR MATCHES "Visual Studio")
message(STATUS "so for older versions of Visual Studio, also download this version") message(STATUS "openal-soft versions newer than 1.18.2 need Visual Studio 2015 or newer")
message(STATUS "so for older versions of Visual Studio, also download this version")
endif()
set(OPENAL_LEGACY_VERSION 1.18.2) set(OPENAL_LEGACY_VERSION 1.18.2)
set(OPENAL_LEGACY_PROJECT openal-soft-${OPENAL_LEGACY_VERSION}) set(OPENAL_LEGACY_PROJECT openal-soft-${OPENAL_LEGACY_VERSION})
set(OPENAL_LEGACY_FILE ${OPENAL_LEGACY_PROJECT}.tar.gz) set(OPENAL_LEGACY_FILE ${OPENAL_LEGACY_PROJECT}.tar.gz)