duckstation/dep/xxhash/CMakeLists.txt

21 lines
639 B
CMake
Raw Normal View History

2020-03-05 11:11:33 +00:00
set(SRCS
include/xxhash.h
src/xxhash.c
)
add_library(xxhash ${SRCS})
2020-12-25 14:41:59 +00:00
if(${CPU_ARCH} STREQUAL "x86" OR ${CPU_ARCH} STREQUAL "x64")
# Required if building with -mavx or -march=native, but you shouldn't be building with it.
target_compile_definitions(xxhash PRIVATE "XXH_X86DISPATCH_ALLOW_AVX")
2020-12-25 14:41:59 +00:00
target_sources(xxhash PRIVATE
include/xxh_x86dispatch.h
src/xxh_x86dispatch.c
)
endif()
2020-03-05 11:11:33 +00:00
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")