mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 05:45:38 +00:00
Build: Fix xxhash on non-Windows
This commit is contained in:
parent
b755798c2a
commit
af3b2b0e15
|
@ -1,10 +1,17 @@
|
|||
set(SRCS
|
||||
include/xxh3.h
|
||||
include/xxhash.h
|
||||
src/xxhash.c
|
||||
)
|
||||
|
||||
add_library(xxhash ${SRCS})
|
||||
|
||||
if(${CPU_ARCH} STREQUAL "x86" OR ${CPU_ARCH} STREQUAL "x64")
|
||||
target_sources(xxhash PRIVATE
|
||||
include/xxh_x86dispatch.h
|
||||
src/xxh_x86dispatch.c
|
||||
)
|
||||
endif()
|
||||
|
||||
target_include_directories(xxhash PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
target_include_directories(xxhash INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
target_compile_definitions(xxhash INTERFACE "XXH_STATIC_LINKING_ONLY")
|
||||
|
|
|
@ -52,11 +52,21 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\xxhash.c" />
|
||||
<ClCompile Include="src\xxh_x86dispatch.c" />
|
||||
<ClCompile Include="src\xxh_x86dispatch.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseLTCG|ARM64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugFast|ARM64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\xxhash.h" />
|
||||
<ClInclude Include="include\xxh_x86dispatch.h" />
|
||||
<ClInclude Include="include\xxh_x86dispatch.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseLTCG|ARM64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugFast|ARM64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{09553C96-9F39-49BF-8AE6-7ACBD07C410C}</ProjectGuid>
|
||||
|
|
|
@ -114,7 +114,7 @@ set(RECOMPILER_SRCS
|
|||
target_include_directories(core PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
||||
target_include_directories(core PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
||||
target_link_libraries(core PUBLIC Threads::Threads common zlib vulkan-loader)
|
||||
target_link_libraries(core PRIVATE glad stb)
|
||||
target_link_libraries(core PRIVATE glad stb xxhash)
|
||||
|
||||
if(WIN32)
|
||||
target_sources(core PRIVATE
|
||||
|
|
Loading…
Reference in a new issue