@ -1,5 +1,4 @@
package ( " proj " )
package ( " proj " )
set_homepage ( " https://proj.org/index.html " )
set_homepage ( " https://proj.org/index.html " )
set_description ( " PROJ is a generic coordinate transformation software that transforms geospatial coordinates from one coordinate reference system (CRS) to another. " )
set_description ( " PROJ is a generic coordinate transformation software that transforms geospatial coordinates from one coordinate reference system (CRS) to another. " )
set_license ( " MIT " )
set_license ( " MIT " )
@ -13,14 +12,15 @@ package("proj")
add_configs ( " tiff " , { description = " Enable TIFF support. " , default = false , type = " boolean " } )
add_configs ( " tiff " , { description = " Enable TIFF support. " , default = false , type = " boolean " } )
add_configs ( " curl " , { description = " Enable Curl support. " , default = false , type = " boolean " } )
add_configs ( " curl " , { description = " Enable Curl support. " , default = false , type = " boolean " } )
add_deps ( " cmake " , " sqlite3 " )
if is_plat ( " windows " , " mingw " ) then
add_deps ( " nlohmann_json " , { configs = { cmake = true } } )
if is_plat ( " windows " ) then
add_syslinks ( " shell32 " , " ole32 " )
add_syslinks ( " shell32 " , " ole32 " )
elseif is_plat ( " linux " ) then
elseif is_plat ( " linux " , " bsd " ) then
add_syslinks ( " pthread " )
add_syslinks ( " dl " , " pthread" )
end
end
add_deps ( " cmake " , " sqlite3 " )
add_deps ( " nlohmann_json " , { configs = { cmake = true } } )
on_load ( function ( package )
on_load ( function ( package )
if package : config ( " tiff " ) then
if package : config ( " tiff " ) then
package : add ( " deps " , " libtiff " )
package : add ( " deps " , " libtiff " )
@ -31,6 +31,10 @@ package("proj")
if package : config ( " apps " ) then
if package : config ( " apps " ) then
package : addenv ( " PATH " , " bin " )
package : addenv ( " PATH " , " bin " )
end
end
if not package : config ( " shared " ) then
package : add ( " defines " , " PROJ_DLL= " )
end
end )
end )
on_install ( " !wasm and (!android or android@!windows) " , function ( package )
on_install ( " !wasm and (!android or android@!windows) " , function ( package )
@ -55,11 +59,6 @@ package("proj")
else
else
import ( " package.tools.cmake " ) . install ( package , configs )
import ( " package.tools.cmake " ) . install ( package , configs )
end
end
if not package : config ( " shared " ) then
-- public compile definitions in CMake
package : add ( " defines " , " PROJ_DLL= " )
end
end )
end )
on_test ( function ( package )
on_test ( function ( package )