Skip to content

Commit

Permalink
Fix apriltag 3rdparty build on windows with msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
fspindle committed Oct 2, 2024
1 parent 4f49821 commit 201d1fd
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions 3rdparty/apriltag/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ if(NOT WITH_APRILTAG_BIG_FAMILY)
vp_list_filterout(lib_hdrs tagStandard52h13.h)
endif()

if (WIN32 AND NOT MINGW)
vp_list_filterout(lib_srcs pthreads_cross.c)
if (WIN32)
if(NOT MINGW)
vp_list_filterout(lib_srcs pthreads_cross.c)
endif()
endif()

if(UNIX)
Expand Down Expand Up @@ -64,24 +66,26 @@ endif()
if(MSVC)
if(BUILD_SHARED_LIBS)
vp_warnings_disable(CMAKE_CXX_FLAGS /wd4018 /wd4098 /wd4244 /wd4267 /wd4305 /wd4334 /wd4244 /wd4838 /wd4996 /wd6011 /wd6385 /wd6386 /wd6387 /wd6011 /wd26451)
vp_set_source_file_compile_flag(common/zmaxheap.c /wd4098 /wd4244)
vp_set_source_file_compile_flag(common/workerpool.c /wd4018 /wd4244)
vp_set_source_file_compile_flag(common/pam.c /wd4018)
vp_set_source_file_compile_flag(common/homography.c /wd4244)
vp_set_source_file_compile_flag(common/matd.c /wd4244)
vp_set_source_file_compile_flag(common/g2d.c /wd4244)
vp_set_source_file_compile_flag(common/homography.c /wd4244)
vp_set_source_file_compile_flag(common/image_u8.c /wd4244)
vp_set_source_file_compile_flag(common/image_u8x3.c /wd4244)
vp_set_source_file_compile_flag(common/string_util.c /wd4018 /wd4267 /wd4996)
vp_set_source_file_compile_flag(common/pam.c /wd4018)
vp_set_source_file_compile_flag(common/pthreads_cross.c /wd4068 /wd4244)
vp_set_source_file_compile_flag(common/string_util.c /wd4018 /wd4267 /wd4996)
vp_set_source_file_compile_flag(common/time_util.c /wd4244)
vp_set_source_file_compile_flag(common/workerpool.c /wd4018 /wd4244)
vp_set_source_file_compile_flag(common/zmaxheap.c /wd4098 /wd4244)
vp_set_source_file_compile_flag(apriltag.c /wd4244)
vp_set_source_file_compile_flag(apriltag_pose.c /wd4244)
vp_set_source_file_compile_flag(apriltag_quad_thresh.c /wd4244)
vp_set_source_file_compile_flag(tag16h5.c /wd4996)
vp_set_source_file_compile_flag(tag25h7.c /wd4996)
vp_set_source_file_compile_flag(tag25h9.c /wd4996)
vp_set_source_file_compile_flag(tag36h10.c /wd4996)
vp_set_source_file_compile_flag(tag36h11.c /wd4996)
vp_set_source_file_compile_flag(tagCircle21h7.c /wd4996)
vp_set_source_file_compile_flag(tag16h5.c /wd4996 /wd4244)
vp_set_source_file_compile_flag(tag25h7.c /wd4996 /wd4244)
vp_set_source_file_compile_flag(tag25h9.c /wd4996 /wd4244)
vp_set_source_file_compile_flag(tag36h10.c /wd499 /wd42446)
vp_set_source_file_compile_flag(tag36h11.c /wd4996 /wd4244)
vp_set_source_file_compile_flag(tagCircle21h7.c /wd4996 /wd4244)
# disable optimization
foreach(f ${tag_srcs})
vp_set_source_file_compile_flag(${f} /O0)
Expand Down

0 comments on commit 201d1fd

Please sign in to comment.