mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Remove build logic for unsupported compilers
This commit is contained in:
parent
18bb892625
commit
4a189d6602
@ -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})
|
||||
|
@ -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()
|
||||
|
||||
|
@ -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
|
||||
|
BIN
extlibs/libs-msvc/x64/flac.lib
vendored
BIN
extlibs/libs-msvc/x64/flac.lib
vendored
Binary file not shown.
BIN
extlibs/libs-msvc/x64/freetype.lib
vendored
BIN
extlibs/libs-msvc/x64/freetype.lib
vendored
Binary file not shown.
BIN
extlibs/libs-msvc/x64/ogg.lib
vendored
BIN
extlibs/libs-msvc/x64/ogg.lib
vendored
Binary file not shown.
BIN
extlibs/libs-msvc/x64/openal32.lib
vendored
BIN
extlibs/libs-msvc/x64/openal32.lib
vendored
Binary file not shown.
BIN
extlibs/libs-msvc/x64/vorbis.lib
vendored
BIN
extlibs/libs-msvc/x64/vorbis.lib
vendored
Binary file not shown.
BIN
extlibs/libs-msvc/x64/vorbisenc.lib
vendored
BIN
extlibs/libs-msvc/x64/vorbisenc.lib
vendored
Binary file not shown.
BIN
extlibs/libs-msvc/x64/vorbisfile.lib
vendored
BIN
extlibs/libs-msvc/x64/vorbisfile.lib
vendored
Binary file not shown.
BIN
extlibs/libs-msvc/x86/flac.lib
vendored
BIN
extlibs/libs-msvc/x86/flac.lib
vendored
Binary file not shown.
BIN
extlibs/libs-msvc/x86/freetype.lib
vendored
BIN
extlibs/libs-msvc/x86/freetype.lib
vendored
Binary file not shown.
BIN
extlibs/libs-msvc/x86/ogg.lib
vendored
BIN
extlibs/libs-msvc/x86/ogg.lib
vendored
Binary file not shown.
BIN
extlibs/libs-msvc/x86/openal32.lib
vendored
BIN
extlibs/libs-msvc/x86/openal32.lib
vendored
Binary file not shown.
BIN
extlibs/libs-msvc/x86/vorbis.lib
vendored
BIN
extlibs/libs-msvc/x86/vorbis.lib
vendored
Binary file not shown.
BIN
extlibs/libs-msvc/x86/vorbisenc.lib
vendored
BIN
extlibs/libs-msvc/x86/vorbisenc.lib
vendored
Binary file not shown.
BIN
extlibs/libs-msvc/x86/vorbisfile.lib
vendored
BIN
extlibs/libs-msvc/x86/vorbisfile.lib
vendored
Binary file not shown.
@ -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)
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user