diff --git a/src/nonFree/sift/CMakeLists.txt b/src/nonFree/sift/CMakeLists.txt index 2f6f79780f..30d83bdc18 100644 --- a/src/nonFree/sift/CMakeLists.txt +++ b/src/nonFree/sift/CMakeLists.txt @@ -44,11 +44,16 @@ set(FEATS_H set_source_files_properties(${FEATS} ${FEATS_H} PROPERTIES LANGUAGE C) set_source_files_properties(${FEATS_H} PROPERTIES HEADER_FILE_ONLY TRUE) +set(SIMD_DEFINITIONS "-DVL_DISABLE_AVX") +if(NOT ALICEVISION_HAVE_SSE) + set(SIMD_DEFINITIONS "${SIMD_DEFINITIONS} -DVL_DISABLE_SSE2") +endif() + alicevision_add_library(vlsift SOURCES ${FEATS} ${FEATS_H} PUBLIC_DEFINITIONS - -DVL_DISABLE_AVX + ${SIMD_DEFINITIONS} PRIVATE_DEFINITIONS -DVL_BUILD_DLL )