1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 12:12:50 +01:00

Fix GCC compilation for windows

This commit is contained in:
kd-11 2024-09-07 15:17:12 +00:00 committed by kd-11
parent 03980304cf
commit b31280e387
2 changed files with 6 additions and 5 deletions

View File

@ -100,10 +100,6 @@ else()
add_link_options(-no-pie) add_link_options(-no-pie)
endif() endif()
elseif(APPLE) elseif(APPLE)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_options(-stdlib=libc++)
endif()
if (CMAKE_OSX_ARCHITECTURES MATCHES "x86_64") if (CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
add_link_options(-Wl,-image_base,0x10000 -Wl,-pagezero_size,0x10000) add_link_options(-Wl,-image_base,0x10000 -Wl,-pagezero_size,0x10000)
add_link_options(-Wl,-no_pie) add_link_options(-Wl,-no_pie)
@ -119,4 +115,9 @@ else()
add_link_options(-Wl,--image-base,0x10000) add_link_options(-Wl,--image-base,0x10000)
endif() endif()
# Specify C++ library to use as standard C++ when using clang
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_options(-stdlib=libc++)
endif()
endif() endif()

View File

@ -114,7 +114,7 @@ if(UNIX)
endif() endif()
if(WIN32) if(WIN32)
target_link_libraries(rpcs3 PRIVATE bcrypt ws2_32 Iphlpapi Winmm Psapi gdi32 setupapi pdh c++) target_link_libraries(rpcs3 PRIVATE bcrypt ws2_32 Iphlpapi Winmm Psapi gdi32 setupapi pdh)
else() else()
target_link_libraries(rpcs3 PRIVATE ${CMAKE_DL_LIBS}) target_link_libraries(rpcs3 PRIVATE ${CMAKE_DL_LIBS})
endif() endif()