(args)
| 419 | |
| 420 | |
| 421 | def build_colmap(args): |
| 422 | extra_config_args = [] |
| 423 | if args.qt_path != "": |
| 424 | extra_config_args.append("-DQt5_DIR={}".format( |
| 425 | os.path.join(args.qt_path, "lib/cmake/Qt5"))) |
| 426 | |
| 427 | if args.boost_path != "": |
| 428 | extra_config_args.append( |
| 429 | "-DBOOST_ROOT={}".format(args.boost_path)) |
| 430 | extra_config_args.append( |
| 431 | "-DBOOST_LIBRARYDIR={}".format(args.boost_path)) |
| 432 | |
| 433 | if args.cuda_path != "": |
| 434 | extra_config_args.append( |
| 435 | "-DCUDA_TOOLKIT_ROOT_DIR={}".format(args.cuda_path)) |
| 436 | |
| 437 | if args.with_cuda: |
| 438 | extra_config_args.append("-DCUDA_ENABLED=ON") |
| 439 | else: |
| 440 | extra_config_args.append("-DCUDA_ENABLED=OFF") |
| 441 | |
| 442 | if args.cuda_archs: |
| 443 | extra_config_args.append("-DCMAKE_CUDA_ARCHITECTURES={}".format(args.cuda_archs)) |
| 444 | |
| 445 | if args.with_opengl: |
| 446 | extra_config_args.append("-DOPENGL_ENABLED=ON") |
| 447 | else: |
| 448 | extra_config_args.append("-DOPENGL_ENABLED=OFF") |
| 449 | |
| 450 | if args.with_tests: |
| 451 | extra_config_args.append("-DTESTS_ENABLED=ON") |
| 452 | else: |
| 453 | extra_config_args.append("-DTESTS_ENABLED=OFF") |
| 454 | |
| 455 | if args.cgal_path: |
| 456 | extra_config_args.append("-DCGAL_DIR={}".format(args.cgal_path)) |
| 457 | |
| 458 | if PLATFORM_IS_WINDOWS: |
| 459 | extra_config_args.append("-DCMAKE_CXX_FLAGS=/DGOOGLE_GLOG_DLL_DECL=") |
| 460 | |
| 461 | mkdir_if_not_exists(os.path.join(args.build_path, "colmap")) |
| 462 | |
| 463 | build_cmake_project(args, os.path.join(args.build_path, "colmap/__build__"), |
| 464 | extra_config_args=extra_config_args, |
| 465 | cmakelists_path=os.path.abspath(args.colmap_path)) |
| 466 | |
| 467 | |
| 468 | def build_post_process(args): |
no test coverage detected