@@ -3,31 +3,37 @@ package("openmvs")
33 set_description (" open Multi-View Stereo reconstruction library" )
44 set_license (" AGPL-3.0" )
55
6- add_urls (" https://github.com/cdcseacave/openMVS/archive/refs/tags/v$(version).tar.gz" )
6+ add_urls (" https://github.com/cdcseacave/openMVS/archive/refs/tags/$(version).tar.gz" ,
7+ " https://github.com/cdcseacave/openMVS.git" )
78
8- add_versions (" 2 .3.0" , " ac7312fb71dbab18c5b2755ad9ac3caa40ec689f6f369c330ca73c87c1f34258" )
9+ add_versions (" v2 .3.0" , " ac7312fb71dbab18c5b2755ad9ac3caa40ec689f6f369c330ca73c87c1f34258" )
910
10- add_configs (" shared" , {description = " Build shared library." , default = false , type = " boolean" , readonly = true })
11+ if is_plat (" windows" ) then
12+ add_configs (" shared" , {description = " Build shared library." , default = false , type = " boolean" , readonly = true })
13+ end
1114
1215 add_configs (" ceres" , {description = " Enable CERES optimization library" , default = false , type = " boolean" })
1316 add_configs (" cuda" , {description = " Enable CUDA library" , default = false , type = " boolean" })
1417 add_configs (" openmp" , {description = " Enable OpenMP library" , default = true , type = " boolean" })
1518 add_configs (" python" , {description = " Enable Python library bindings" , default = false , type = " boolean" })
1619
17- add_deps (" cmake" , " eigen" , " glew" , " opencv" , " cgal" , " vcglib" , " zstd" )
20+ add_deps (" cmake" , " eigen <5.0 " , " glew" , " opencv" , " cgal" , " vcglib" , " zstd" )
1821 add_deps (" boost" , {configs = {iostreams = true , container = true , graph = true , program_options = true , serialization = true , thread = true , zlib = true , zstd = true }})
1922
20- on_load (" windows " , function (package )
23+ on_load (function (package )
2124 package :add (" defines" , " BOOST_ALL_NO_LIB" ) -- disable boost auto-linking
22- if package :toolchain (" msvc" ) then package :add (" cxxflags" , " /Zc:__cplusplus" ) end -- enable msvc __cplusplus
25+ package :add (" linkdirs" , " lib/OpenMVS" )
26+ if package :has_tool (" cxx" , " cl" ) then
27+ package :add (" cxxflags" , " /Zc:__cplusplus" )
28+ end
2329
2430 if package :config (" ceres" ) then package :add (" deps" , " ceres-solver" ) end
2531 if package :config (" cuda" ) then package :add (" deps" , " cuda" ) end
2632 if package :config (" openmp" ) then package :add (" deps" , " openmp" ) end
2733 if package :config (" python" ) then package :add (" deps" , " python" ) end
2834 end )
2935
30- on_install (" windows|x64 " , " windows|x86 " , function (package )
36+ on_install (" windows" , " linux " , " macosx " , function (package )
3137 io .replace (" CMakeLists.txt" , " # Project-wide settings" , [[
3238 # Project-wide settings
3339 find_package(PkgConfig REQUIRED)
@@ -44,12 +50,6 @@ package("openmvs")
4450 " -DOpenMVS_ENABLE_TESTS=OFF" ,
4551 }
4652 import (" package.tools.cmake" ).install (package , configs )
47-
48- package :add (" linkdirs" , " lib/OpenMVS" )
49- local libs = os.files (package :installdir (" lib/OpenMVS/*.lib" ))
50- for _ , filepath in ipairs (libs ) do
51- package :add (" links" , path.basename (filepath ))
52- end
5353 end )
5454
5555 on_test (function (package )
0 commit comments