mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
cmake: fix MSVC build
This commit is contained in:
parent
c40826c140
commit
75b2dfa66d
5
3rdparty/libpng/CMakeLists.txt
vendored
5
3rdparty/libpng/CMakeLists.txt
vendored
@ -4,6 +4,11 @@ if (NOT USE_SYSTEM_LIBPNG)
|
||||
# We use libpng's static library and don't need to build the shared library and run the tests
|
||||
set(PNG_SHARED OFF CACHE BOOL "Build shared lib")
|
||||
set(PNG_TESTS OFF CACHE BOOL "Build libpng tests")
|
||||
if (NOT USE_SYSTEM_ZLIB)
|
||||
set(PNG_BUILD_ZLIB ON CACHE BOOL "Custom zlib location, else find_package is used")
|
||||
add_library(ZLIB::ZLIB INTERFACE IMPORTED)
|
||||
target_link_libraries(ZLIB::ZLIB INTERFACE 3rdparty_zlib)
|
||||
endif()
|
||||
set(SKIP_INSTALL_ALL ON)
|
||||
add_subdirectory(libpng EXCLUDE_FROM_ALL)
|
||||
target_include_directories(png_static INTERFACE "${libpng_BINARY_DIR}" "${libpng_SOURCE_DIR}")
|
||||
|
4
3rdparty/zlib/CMakeLists.txt
vendored
4
3rdparty/zlib/CMakeLists.txt
vendored
@ -15,5 +15,7 @@ else()
|
||||
target_include_directories(3rdparty_zlib INTERFACE zlib ${CMAKE_CURRENT_BINARY_DIR}/zlib)
|
||||
target_compile_definitions(3rdparty_zlib INTERFACE -DZLIB_CONST=1)
|
||||
|
||||
set(ZLIB_ROOT ${CMAKE_CURRENT_BINARY_DIR}/zlib PARENT_SCOPE)
|
||||
if(NOT MSVC)
|
||||
set(ZLIB_ROOT ${CMAKE_CURRENT_BINARY_DIR}/zlib PARENT_SCOPE)
|
||||
endif()
|
||||
endif()
|
||||
|
@ -148,7 +148,7 @@ if(WIN32)
|
||||
Audio/XAudio2/XAudio2Backend.cpp
|
||||
Audio/XAudio2/xaudio2_enumerator.cpp
|
||||
)
|
||||
target_compile_definitions(rpcs3_emu PRIVATE UNICODE _UNICODE _WIN32_WINNT=0x0602)
|
||||
target_compile_definitions(rpcs3_emu PRIVATE UNICODE _UNICODE _WIN32_WINNT=0x0A00)
|
||||
endif()
|
||||
|
||||
target_link_libraries(rpcs3_emu
|
||||
|
Loading…
Reference in New Issue
Block a user