| 1 |
set(VLFEAT_SOURCE_FILES |
| 2 |
aib.c |
| 3 |
aib.h |
| 4 |
array.c |
| 5 |
array.h |
| 6 |
covdet.c |
| 7 |
covdet.h |
| 8 |
dsift.c |
| 9 |
dsift.h |
| 10 |
fisher.c |
| 11 |
fisher.h |
| 12 |
float.h |
| 13 |
generic.c |
| 14 |
generic.h |
| 15 |
getopt_long.c |
| 16 |
getopt_long.h |
| 17 |
gmm.c |
| 18 |
gmm.h |
| 19 |
heap-def.h |
| 20 |
hikmeans.c |
| 21 |
hikmeans.h |
| 22 |
hog.c |
| 23 |
hog.h |
| 24 |
homkermap.c |
| 25 |
homkermap.h |
| 26 |
host.c |
| 27 |
host.h |
| 28 |
ikmeans.c |
| 29 |
ikmeans.h |
| 30 |
ikmeans_elkan.tc |
| 31 |
ikmeans_init.tc |
| 32 |
ikmeans_lloyd.tc |
| 33 |
imopv.c |
| 34 |
imopv.h |
| 35 |
kdtree.c |
| 36 |
kdtree.h |
| 37 |
kmeans.c |
| 38 |
kmeans.h |
| 39 |
lbp.c |
| 40 |
lbp.h |
| 41 |
liop.c |
| 42 |
liop.h |
| 43 |
mathop.c |
| 44 |
mathop.h |
| 45 |
mser.c |
| 46 |
mser.h |
| 47 |
pgm.c |
| 48 |
pgm.h |
| 49 |
qsort-def.h |
| 50 |
quickshift.c |
| 51 |
quickshift.h |
| 52 |
random.c |
| 53 |
random.h |
| 54 |
rodrigues.c |
| 55 |
rodrigues.h |
| 56 |
scalespace.c |
| 57 |
scalespace.h |
| 58 |
shuffle-def.h |
| 59 |
sift.c |
| 60 |
sift.h |
| 61 |
slic.c |
| 62 |
slic.h |
| 63 |
stringop.c |
| 64 |
stringop.h |
| 65 |
svm.c |
| 66 |
svm.h |
| 67 |
svmdataset.c |
| 68 |
svmdataset.h |
| 69 |
vlad.c |
| 70 |
vlad.h) |
| 71 |
|
| 72 |
if(SIMD_ENABLED AND IS_X86) |
| 73 |
if(MSVC) |
| 74 |
# https://github.com/vlfeat/vlfeat/commit/4f0098fd47e9 |
| 75 |
add_compile_definitions(VL_DISABLE_AVX) |
| 76 |
else() |
| 77 |
set(AVX_SOURCES |
| 78 |
mathop_avx.c |
| 79 |
mathop_avx.h) |
| 80 |
endif() |
| 81 |
|
| 82 |
set(SSE2_SOURCES |
| 83 |
imopv_sse2.c |
| 84 |
imopv_sse2.h |
| 85 |
mathop_sse2.c |
| 86 |
mathop_sse2.h) |
| 87 |
|
| 88 |
list(APPEND VLFEAT_SOURCE_FILES ${AVX_SOURCES} ${SSE2_SOURCES}) |
| 89 |
|
| 90 |
if(MSVC) |
| 91 |
set_source_files_properties(${AVX_SOURCES} |
| 92 |
PROPERTIES COMPILE_FLAGS "/arch:AVX") |
| 93 |
set_source_files_properties(${SSE2_SOURCES} |
| 94 |
PROPERTIES COMPILE_FLAGS "/D__SSE2__") |
| 95 |
else() |
| 96 |
set_source_files_properties(${AVX_SOURCES} |
| 97 |
PROPERTIES COMPILE_FLAGS "-mavx") |
| 98 |
set_source_files_properties(${SSE2_SOURCES} |
| 99 |
PROPERTIES COMPILE_FLAGS "-msse2") |
| 100 |
endif() |
| 101 |
else() |
| 102 |
add_compile_definitions(VL_DISABLE_AVX) |
| 103 |
add_compile_definitions(VL_DISABLE_SSE2) |
| 104 |
endif() |
| 105 |
|
| 106 |
if(NOT OPENMP_ENABLED OR NOT OPENMP_FOUND) |
| 107 |
add_compile_definitions(VL_DISABLE_OPENMP) |
| 108 |
endif() |
| 109 |
|
| 110 |
COLMAP_ADD_LIBRARY( |
| 111 |
NAME colmap_vlfeat |
| 112 |
SRCS ${VLFEAT_SOURCE_FILES} |
| 113 |
) |
| 114 |
if(OPENMP_FOUND) |
| 115 |
target_link_libraries(colmap_vlfeat PRIVATE OpenMP::OpenMP_C) |
| 116 |
endif() |