diff --git a/CMakeLists.txt b/CMakeLists.txt index 35bd1168..aa9b9c57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -201,14 +201,7 @@ endif() # Visual C++: remove warnings regarding SL security and algorithms on pointers if(SFML_COMPILER_MSVC) # add an option to choose whether PDB debug symbols should be generated (defaults to true when possible) - if(CMAKE_VERSION VERSION_LESS 3.1) - sfml_set_option(SFML_GENERATE_PDB FALSE BOOL "True to generate PDB debug symbols, FALSE otherwise. Requires CMake 3.1.") - if(SFML_GENERATE_PDB) - message(FATAL_ERROR "Generation of PDB files (SFML_GENERATE_PDB) requires at least CMake 3.1.0") - endif() - else() - sfml_set_option(SFML_GENERATE_PDB TRUE BOOL "True to generate PDB debug symbols, FALSE otherwise. Requires CMake 3.1.") - endif() + sfml_set_option(SFML_GENERATE_PDB TRUE BOOL "True to generate PDB debug symbols, FALSE otherwise. Requires CMake 3.1.") add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS) endif() @@ -429,18 +422,14 @@ if(SFML_OS_WINDOWS) # install the binaries of SFML dependencies if(ARCH_32BITS) install(DIRECTORY extlibs/bin/x86/ DESTINATION ${CMAKE_INSTALL_BINDIR}) - if(SFML_COMPILER_MSVC AND SFML_MSVC_VERSION LESS 14) - install(DIRECTORY extlibs/libs-msvc/x86/ DESTINATION ${CMAKE_INSTALL_LIBDIR}) - elseif(SFML_COMPILER_MSVC OR (SFML_COMPILER_CLANG AND NOT MINGW)) + if(SFML_COMPILER_MSVC OR (SFML_COMPILER_CLANG AND NOT MINGW)) install(DIRECTORY extlibs/libs-msvc-universal/x86/ DESTINATION ${CMAKE_INSTALL_LIBDIR}) else() install(DIRECTORY extlibs/libs-mingw/x86/ DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() elseif(ARCH_64BITS) install(DIRECTORY extlibs/bin/x64/ DESTINATION ${CMAKE_INSTALL_BINDIR}) - if(SFML_COMPILER_MSVC AND SFML_MSVC_VERSION LESS 14) - install(DIRECTORY extlibs/libs-msvc/x64/ DESTINATION ${CMAKE_INSTALL_LIBDIR}) - elseif(SFML_COMPILER_MSVC OR (SFML_COMPILER_CLANG AND NOT MINGW)) + if(SFML_COMPILER_MSVC OR (SFML_COMPILER_CLANG AND NOT MINGW)) install(DIRECTORY extlibs/libs-msvc-universal/x64/ DESTINATION ${CMAKE_INSTALL_LIBDIR}) else() install(DIRECTORY extlibs/libs-mingw/x64/ DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake index 580c734d..b705ec3d 100644 --- a/cmake/Macros.cmake +++ b/cmake/Macros.cmake @@ -11,8 +11,8 @@ endmacro () # set the appropriate standard library on each platform for the given target # example: sfml_set_stdlib(sfml-system) function(sfml_set_stdlib target) - # for gcc >= 4.0 on Windows, apply the SFML_USE_STATIC_STD_LIBS option if it is enabled - if(SFML_OS_WINDOWS AND SFML_COMPILER_GCC AND NOT SFML_GCC_VERSION VERSION_LESS "4") + # for gcc on Windows, apply the SFML_USE_STATIC_STD_LIBS option if it is enabled + if(SFML_OS_WINDOWS AND SFML_COMPILER_GCC) if(SFML_USE_STATIC_STD_LIBS AND NOT SFML_COMPILER_GCC_TDM) target_link_libraries(${target} PRIVATE "-static-libgcc" "-static-libstdc++") elseif(NOT SFML_USE_STATIC_STD_LIBS AND SFML_COMPILER_GCC_TDM) @@ -153,9 +153,9 @@ macro(sfml_add_library target) endif() endif() - # if using gcc >= 4.0 or clang >= 3.0 on a non-Windows platform, we must hide public symbols by default + # if using gcc or clang on a non-Windows platform, we must hide public symbols by default # (exported ones are explicitly marked) - if(NOT SFML_OS_WINDOWS AND ((SFML_COMPILER_GCC AND NOT SFML_GCC_VERSION VERSION_LESS "4") OR (SFML_COMPILER_CLANG AND NOT SFML_CLANG_VERSION VERSION_LESS "3"))) + if(NOT SFML_OS_WINDOWS AND (SFML_COMPILER_GCC OR SFML_COMPILER_CLANG)) set_target_properties(${target} PROPERTIES COMPILE_FLAGS -fvisibility=hidden) endif() diff --git a/cmake/SFMLConfigDependencies.cmake.in b/cmake/SFMLConfigDependencies.cmake.in index c5813bd6..6786ad94 100644 --- a/cmake/SFMLConfigDependencies.cmake.in +++ b/cmake/SFMLConfigDependencies.cmake.in @@ -1,8 +1,3 @@ - -if (CMAKE_VERSION VERSION_LESS 3.5.2) - include(CMakeParseArguments) -endif() - # in case of static linking, we must also define the list of all the dependencies of SFML libraries if(SFML_STATIC_LIBRARIES) # detect the OS diff --git a/extlibs/libs-msvc/x64/flac.lib b/extlibs/libs-msvc/x64/flac.lib deleted file mode 100644 index a0819b3c..00000000 Binary files a/extlibs/libs-msvc/x64/flac.lib and /dev/null differ diff --git a/extlibs/libs-msvc/x64/freetype.lib b/extlibs/libs-msvc/x64/freetype.lib deleted file mode 100644 index 3bca01ca..00000000 Binary files a/extlibs/libs-msvc/x64/freetype.lib and /dev/null differ diff --git a/extlibs/libs-msvc/x64/ogg.lib b/extlibs/libs-msvc/x64/ogg.lib deleted file mode 100644 index ce605523..00000000 Binary files a/extlibs/libs-msvc/x64/ogg.lib and /dev/null differ diff --git a/extlibs/libs-msvc/x64/openal32.lib b/extlibs/libs-msvc/x64/openal32.lib deleted file mode 100644 index c2eafbff..00000000 Binary files a/extlibs/libs-msvc/x64/openal32.lib and /dev/null differ diff --git a/extlibs/libs-msvc/x64/vorbis.lib b/extlibs/libs-msvc/x64/vorbis.lib deleted file mode 100644 index 2e50a293..00000000 Binary files a/extlibs/libs-msvc/x64/vorbis.lib and /dev/null differ diff --git a/extlibs/libs-msvc/x64/vorbisenc.lib b/extlibs/libs-msvc/x64/vorbisenc.lib deleted file mode 100644 index 023d7c62..00000000 Binary files a/extlibs/libs-msvc/x64/vorbisenc.lib and /dev/null differ diff --git a/extlibs/libs-msvc/x64/vorbisfile.lib b/extlibs/libs-msvc/x64/vorbisfile.lib deleted file mode 100644 index be04d712..00000000 Binary files a/extlibs/libs-msvc/x64/vorbisfile.lib and /dev/null differ diff --git a/extlibs/libs-msvc/x86/flac.lib b/extlibs/libs-msvc/x86/flac.lib deleted file mode 100644 index 6686dcb1..00000000 Binary files a/extlibs/libs-msvc/x86/flac.lib and /dev/null differ diff --git a/extlibs/libs-msvc/x86/freetype.lib b/extlibs/libs-msvc/x86/freetype.lib deleted file mode 100644 index 6e57b1eb..00000000 Binary files a/extlibs/libs-msvc/x86/freetype.lib and /dev/null differ diff --git a/extlibs/libs-msvc/x86/ogg.lib b/extlibs/libs-msvc/x86/ogg.lib deleted file mode 100644 index f6d07ca7..00000000 Binary files a/extlibs/libs-msvc/x86/ogg.lib and /dev/null differ diff --git a/extlibs/libs-msvc/x86/openal32.lib b/extlibs/libs-msvc/x86/openal32.lib deleted file mode 100644 index fb7524d3..00000000 Binary files a/extlibs/libs-msvc/x86/openal32.lib and /dev/null differ diff --git a/extlibs/libs-msvc/x86/vorbis.lib b/extlibs/libs-msvc/x86/vorbis.lib deleted file mode 100644 index e69b0fde..00000000 Binary files a/extlibs/libs-msvc/x86/vorbis.lib and /dev/null differ diff --git a/extlibs/libs-msvc/x86/vorbisenc.lib b/extlibs/libs-msvc/x86/vorbisenc.lib deleted file mode 100644 index 10f46134..00000000 Binary files a/extlibs/libs-msvc/x86/vorbisenc.lib and /dev/null differ diff --git a/extlibs/libs-msvc/x86/vorbisfile.lib b/extlibs/libs-msvc/x86/vorbisfile.lib deleted file mode 100644 index ada1a6e7..00000000 Binary files a/extlibs/libs-msvc/x86/vorbisfile.lib and /dev/null differ diff --git a/src/SFML/CMakeLists.txt b/src/SFML/CMakeLists.txt index 84a77059..e2f8ed1f 100644 --- a/src/SFML/CMakeLists.txt +++ b/src/SFML/CMakeLists.txt @@ -14,18 +14,10 @@ if (SFML_OS_WINDOWS) set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${PROJECT_SOURCE_DIR}/extlibs/bin/x64") endif() elseif(SFML_COMPILER_MSVC OR (SFML_COMPILER_CLANG AND NOT MINGW)) - if(SFML_MSVC_VERSION LESS 14) - if(ARCH_32BITS) - set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${PROJECT_SOURCE_DIR}/extlibs/libs-msvc/x86") - elseif(ARCH_64BITS) - set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${PROJECT_SOURCE_DIR}/extlibs/libs-msvc/x64") - endif() - else() - if(ARCH_32BITS) - set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${PROJECT_SOURCE_DIR}/extlibs/libs-msvc-universal/x86") - elseif(ARCH_64BITS) - set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${PROJECT_SOURCE_DIR}/extlibs/libs-msvc-universal/x64") - endif() + if(ARCH_32BITS) + set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${PROJECT_SOURCE_DIR}/extlibs/libs-msvc-universal/x86") + elseif(ARCH_64BITS) + set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${PROJECT_SOURCE_DIR}/extlibs/libs-msvc-universal/x64") endif() endif() elseif(SFML_OS_MACOSX) diff --git a/src/SFML/Graphics/CMakeLists.txt b/src/SFML/Graphics/CMakeLists.txt index 3b5eaf28..58d4a58d 100644 --- a/src/SFML/Graphics/CMakeLists.txt +++ b/src/SFML/Graphics/CMakeLists.txt @@ -120,7 +120,7 @@ endif() # starting from Visual Studio 2015, inline versions of some C functions are used; for compatibility link this library # see https://docs.microsoft.com/en-us/cpp/porting/overview-of-potential-upgrade-issues-visual-cpp?view=msvc-160#libraries -if((SFML_COMPILER_MSVC AND SFML_MSVC_VERSION GREATER_EQUAL 14) OR (SFML_COMPILER_CLANG AND SFML_OS_WINDOWS AND NOT MINGW)) +if(SFML_COMPILER_MSVC OR (SFML_COMPILER_CLANG AND SFML_OS_WINDOWS AND NOT MINGW)) target_link_libraries(sfml-graphics PRIVATE legacy_stdio_definitions.lib) endif()