-
-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathcollect-deps-makefile.vc
42 lines (33 loc) · 1.39 KB
/
collect-deps-makefile.vc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#
# gdal.netcore package automation
#
!INCLUDE RID.opt
!INCLUDE ../shared/GdalCore.opt
OUTPUT=$(abspath $(PACKAGE_BUILD_ROOT)/runtimes/win-x64/native)
OUTPUT=$(abspath $(OUTPUT))
BUILD_ROOT=$(abspath $(BUILD_ROOT))
BINDINGS_ROOT=$(abspath $(GDAL_CMAKE_TMP)/swig/csharp)
BINDINGS_OUT=$(abspath $(BASE)/bindings)
SDK_ROOT=$(ROOTDIR_)/build-win/sdk/release-1930-x64
all: clean_output collect
get-output:
@echo $(OUTPUT)
clean_output:
-$(DEL_DIR) "$(OUTPUT)\"
copyprojdb:
@if not exist "$(LIBSHARED)" mkdir "$(LIBSHARED)"
$(COPY_I) "$(PROJ_BUILD)/share/proj/proj.db" "$(LIBSHARED)/"
collect_bindings:
@if exist "$(BINDINGS_OUT)" $(DEL_DIR) "$(BINDINGS_OUT)"
@if not exist "$(BINDINGS_OUT)" mkdir "$(BINDINGS_OUT)"
$(COPY_TOP_DIR) "$(BINDINGS_ROOT)\const\*.cs" "$(BINDINGS_OUT)\const\"
$(COPY_TOP_DIR) "$(BINDINGS_ROOT)\gdal\*.cs" "$(BINDINGS_OUT)\gdal\"
$(COPY_TOP_DIR) "$(BINDINGS_ROOT)\osr\*.cs" "$(BINDINGS_OUT)\osr\"
$(COPY_TOP_DIR) "$(BINDINGS_ROOT)\ogr\*.cs" "$(BINDINGS_OUT)\ogr\"
collect: collect_bindings copyprojdb
@if not exist "$(OUTPUT)" mkdir "$(OUTPUT)"
# remove SDK dlls that are not needed
$(DEL_FILE) "$(OUTPUT)\gdal*.dll"
$(COPY) "$(abspath $(BUILD_ROOT)\gdal-build\share\csharp)\*_wrap.dll" "$(OUTPUT)\"
$(COPY_I) "%VCToolsRedistDir%x64\Microsoft.VC$(CRT_VERSION).CRT\*.dll" "$(OUTPUT)\"
for /d %i in ($(BUILD_ROOT)\*-build) do ( cd "%i" & $(COPY) "%i\bin\*.dll" "$(OUTPUT)\" )