mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[gdal] Update to 3.1.3 (#13449)
* [vcpkg_*_nmake] Add option INSTALL_COMMAND * [gdal] Update to 3.1.3 and switch to vcpkg_*_nmake on Windows * [vcpkg_build_make] Add option MAKEFILE * fix install on windows, fix linux build * fix options position * [gdal] Fix linux build * [gdal] Fix expat library name * [gdal] Fix geos library name * [gdal] Fix cmake wrapper * [pdal] Fix dependency geos * [pdal] Fix PDALConfig.cmake * [gdal] Fix dependency cfitsio on *inx * disable cfitsio temporary * [gdal] Correct cmake wrapper and usage * [gdal] Fix tools on windows-static * Revert a9ac823007975485aacc7e1f3eb4053e295376e1 * Apply suggestions * [vcpkg_build_nmake] Fix install command * [vcpkg_build_nmake] Fix install command * regenerate docs * [gdal] Update dependency iconv and charset library names * [gdal] add json-c as a dependency on non-windows Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com> Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
This commit is contained in:
parent
46068e8a37
commit
fdfe770571
@ -1,5 +1,5 @@
|
||||
<!-- Run regenerate.ps1 to extract documentation from scripts\cmake\*.cmake -->
|
||||
|
||||
<!-- Run regenerate.ps1 to extract documentation from scripts\cmake\*.cmake -->
|
||||
|
||||
# Portfile helper functions
|
||||
- [execute\_process](execute_process.md)
|
||||
- [vcpkg\_acquire\_msys](vcpkg_acquire_msys.md)
|
||||
@ -21,15 +21,17 @@
|
||||
- [vcpkg\_configure\_make](vcpkg_configure_make.md)
|
||||
- [vcpkg\_configure\_meson](vcpkg_configure_meson.md)
|
||||
- [vcpkg\_copy\_pdbs](vcpkg_copy_pdbs.md)
|
||||
- [vcpkg\_copy\_tools](vcpkg_copy_tools.md)
|
||||
- [vcpkg\_copy\_tool\_dependencies](vcpkg_copy_tool_dependencies.md)
|
||||
- [vcpkg\_copy\_tools](vcpkg_copy_tools.md)
|
||||
- [vcpkg\_download\_distfile](vcpkg_download_distfile.md)
|
||||
- [vcpkg\_execute\_build\_process](vcpkg_execute_build_process.md)
|
||||
- [vcpkg\_execute\_in\_download\_mode](vcpkg_execute_in_download_mode.md)
|
||||
- [vcpkg\_execute\_required\_process](vcpkg_execute_required_process.md)
|
||||
- [vcpkg\_extract\_source\_archive](vcpkg_extract_source_archive.md)
|
||||
- [vcpkg\_extract\_source\_archive\_ex](vcpkg_extract_source_archive_ex.md)
|
||||
- [vcpkg\_fail\_port\_install](vcpkg_fail_port_install.md)
|
||||
- [vcpkg\_find\_acquire\_program](vcpkg_find_acquire_program.md)
|
||||
- [vcpkg\_find\_fortran](vcpkg_find_fortran.md)
|
||||
- [vcpkg\_fixup\_cmake\_targets](vcpkg_fixup_cmake_targets.md)
|
||||
- [vcpkg\_fixup\_pkgconfig](vcpkg_fixup_pkgconfig.md)
|
||||
- [vcpkg\_from\_bitbucket](vcpkg_from_bitbucket.md)
|
||||
@ -44,4 +46,5 @@
|
||||
- [vcpkg\_install\_msbuild](vcpkg_install_msbuild.md)
|
||||
- [vcpkg\_install\_nmake](vcpkg_install_nmake.md)
|
||||
- [vcpkg\_install\_qmake](vcpkg_install_qmake.md)
|
||||
- [vcpkg\_internal\_get\_cmake\_vars](vcpkg_internal_get_cmake_vars.md)
|
||||
- [vcpkg\_prettify\_command](vcpkg_prettify_command.md)
|
||||
|
@ -4,7 +4,11 @@ Download and prepare an MSYS2 instance.
|
||||
|
||||
## Usage
|
||||
```cmake
|
||||
vcpkg_acquire_msys(<MSYS_ROOT_VAR> [PACKAGES <package>...])
|
||||
vcpkg_acquire_msys(<MSYS_ROOT_VAR>
|
||||
PACKAGES <package>...
|
||||
[NO_DEFAULT_PACKAGES]
|
||||
[DIRECT_PACKAGES <URL> <SHA512> <URL> <SHA512> ...]
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@ -14,7 +18,22 @@ An out-variable that will be set to the path to MSYS2.
|
||||
### PACKAGES
|
||||
A list of packages to acquire in msys.
|
||||
|
||||
To ensure a package is available: `vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.15)`
|
||||
To ensure a package is available: `vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.16)`
|
||||
|
||||
### NO_DEFAULT_PACKAGES
|
||||
Exclude the normal base packages.
|
||||
|
||||
The list of base packages includes: bash, coreutils, sed, grep, gawk, diffutils, make, and pkg-config
|
||||
|
||||
### DIRECT_PACKAGES
|
||||
A list of URL/SHA512 pairs to acquire in msys.
|
||||
|
||||
This parameter can be used by a port to privately extend the list of msys packages to be acquired.
|
||||
The URLs can be found on the msys2 website[1] and should be a direct archive link:
|
||||
|
||||
https://repo.msys2.org/mingw/i686/mingw-w64-i686-gettext-0.19.8.1-9-any.pkg.tar.zst
|
||||
|
||||
[1] https://packages.msys2.org/search
|
||||
|
||||
## Notes
|
||||
A call to `vcpkg_acquire_msys` will usually be followed by a call to `bash.exe`:
|
||||
|
@ -7,6 +7,7 @@ Build a linux makefile project.
|
||||
vcpkg_build_make([BUILD_TARGET <target>]
|
||||
[ADD_BIN_TO_PATH]
|
||||
[ENABLE_INSTALL])
|
||||
[MAKEFILE <makefileName>]
|
||||
[LOGFILE_ROOT <logfileroot>])
|
||||
```
|
||||
|
||||
@ -20,10 +21,19 @@ Adds the appropriate Release and Debug `bin\` directories to the path during the
|
||||
### ENABLE_INSTALL
|
||||
IF the port supports the install target use vcpkg_install_make() instead of vcpkg_build_make()
|
||||
|
||||
### MAKEFILE
|
||||
Specifies the Makefile as a relative path from the root of the sources passed to `vcpkg_configure_make()`
|
||||
|
||||
### BUILD_TARGET
|
||||
The target passed to the make build command (`./make <target>`). If not specified, the 'all' target will
|
||||
be passed.
|
||||
|
||||
### DISABLE_PARALLEL
|
||||
The underlying buildsystem will be instructed to not parallelize
|
||||
|
||||
### SUBPATH
|
||||
Additional subdir to invoke make in. Useful if only parts of a port should be built.
|
||||
|
||||
## Notes:
|
||||
This command should be preceeded by a call to [`vcpkg_configure_make()`](vcpkg_configure_make.md).
|
||||
You can use the alias [`vcpkg_install_make()`](vcpkg_configure_make.md) function if your CMake script supports the
|
||||
|
@ -7,6 +7,7 @@ Build a msvc makefile project.
|
||||
vcpkg_build_nmake(
|
||||
SOURCE_PATH <${SOURCE_PATH}>
|
||||
[NO_DEBUG]
|
||||
[TARGET <all>]
|
||||
[PROJECT_SUBPATH <${SUBPATH}>]
|
||||
[PROJECT_NAME <${MAKEFILE_NAME}>]
|
||||
[PRERUN_SHELL <${SHELL_PATH}>]
|
||||
|
@ -28,7 +28,7 @@ This command will either alter the settings for `VCPKG_LIBRARY_LINKAGE` or fail,
|
||||
|
||||
## Examples
|
||||
|
||||
* [abseil](https://github.com/Microsoft/vcpkg/blob/master/ports/abseil/portfile.cmake)
|
||||
* [libimobiledevice](https://github.com/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake)
|
||||
|
||||
## Source
|
||||
[scripts/cmake/vcpkg_check_linkage.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_check_linkage.cmake)
|
||||
[scripts/cmake/vcpkg_check_linkage.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_check_linkage.cmake)
|
||||
|
@ -5,6 +5,7 @@ File contains helpful variabls for portfiles which are commonly needed or used.
|
||||
## The following variables are available:
|
||||
```cmake
|
||||
VCPKG_TARGET_IS_<target> with <target> being one of the following: WINDOWS, UWP, LINUX, OSX, ANDROID, FREEBSD. only defined if <target>
|
||||
VCPKG_HOST_IS_<target> with <host> being one of the following: WINDOWS, LINUX, OSX, FREEBSD. only defined if <host>
|
||||
VCPKG_HOST_PATH_SEPARATOR Host specific path separator (USAGE: "<something>${VCPKG_HOST_PATH_SEPARATOR}<something>"; only use and pass variables with VCPKG_HOST_PATH_SEPARATOR within "")
|
||||
VCPKG_HOST_EXECUTABLE_SUFFIX executable suffix of the host
|
||||
VCPKG_TARGET_EXECUTABLE_SUFFIX executable suffix of the target
|
||||
|
@ -51,6 +51,9 @@ Additional options passed to CMake during the Release configuration. These are i
|
||||
### OPTIONS_DEBUG
|
||||
Additional options passed to CMake during the Debug configuration. These are in addition to `OPTIONS`.
|
||||
|
||||
### LOGNAME
|
||||
Name of the log to write the output of the configure call to.
|
||||
|
||||
## Notes
|
||||
This command supplies many common arguments to CMake. To see the full list, examine the source.
|
||||
|
||||
|
@ -7,6 +7,13 @@ Configure configure for Debug and Release builds of a project.
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH <${SOURCE_PATH}>
|
||||
[AUTOCONFIG]
|
||||
[USE_WRAPPERS]
|
||||
[DETERMINE_BUILD_TRIPLET]
|
||||
[BUILD_TRIPLET "--host=x64 --build=i686-unknown-pc"]
|
||||
[NO_ADDITIONAL_PATHS]
|
||||
[CONFIG_DEPENDENT_ENVIRONMENT <SOME_VAR>...]
|
||||
[CONFIGURE_ENVIRONMENT_VARIABLES <SOME_ENVVAR>...]
|
||||
[ADD_BIN_TO_PATH]
|
||||
[NO_DEBUG]
|
||||
[SKIP_CONFIGURE]
|
||||
[PROJECT_SUBPATH <${PROJ_SUBPATH}>]
|
||||
@ -29,12 +36,30 @@ By convention, this is usually set in the portfile as the variable `SOURCE_PATH`
|
||||
### SKIP_CONFIGURE
|
||||
Skip configure process
|
||||
|
||||
### USE_WRAPPERS
|
||||
Use autotools ar-lib and compile wrappers (only applies to windows cl and lib)
|
||||
|
||||
### BUILD_TRIPLET
|
||||
Used to pass custom --build/--target/--host to configure. Can be globally overwritten by VCPKG_MAKE_BUILD_TRIPLET
|
||||
|
||||
### DETERMINE_BUILD_TRIPLET
|
||||
For ports having a configure script following the autotools rules for selecting the triplet
|
||||
|
||||
### NO_ADDITIONAL_PATHS
|
||||
Don't pass any additional paths except for --prefix to the configure call
|
||||
|
||||
### AUTOCONFIG
|
||||
Need to use autoconfig to generate configure file.
|
||||
|
||||
### PRERUN_SHELL
|
||||
Script that needs to be called before configuration (do not use for batch files which simply call autoconf or configure)
|
||||
|
||||
### ADD_BIN_TO_PATH
|
||||
Adds the appropriate Release and Debug `bin\` directories to the path during configure such that executables can run against the in-tree DLLs.
|
||||
|
||||
## DISABLE_VERBOSE_FLAGS
|
||||
do not pass '--disable-silent-rules --verbose' to configure
|
||||
|
||||
### OPTIONS
|
||||
Additional options passed to configure during the configuration.
|
||||
|
||||
@ -44,6 +69,14 @@ Additional options passed to configure during the Release configuration. These a
|
||||
### OPTIONS_DEBUG
|
||||
Additional options passed to configure during the Debug configuration. These are in addition to `OPTIONS`.
|
||||
|
||||
### CONFIG_DEPENDENT_ENVIRONMENT
|
||||
List of additional configuration dependent environment variables to set.
|
||||
Pass SOMEVAR to set the environment and have SOMEVAR_(DEBUG|RELEASE) set in the portfile to the appropriate values
|
||||
General environment variables can be set from within the portfile itself.
|
||||
|
||||
### CONFIGURE_ENVIRONMENT_VARIABLES
|
||||
List of additional environment variables to pass via the configure call.
|
||||
|
||||
## Notes
|
||||
This command supplies many common arguments to configure. To see the full list, examine the source.
|
||||
|
||||
|
@ -28,6 +28,9 @@ The expected hash for the file.
|
||||
|
||||
If this doesn't match the downloaded version, the build will be terminated with a message describing the mismatch.
|
||||
|
||||
### QUIET
|
||||
Suppress output on cache hit
|
||||
|
||||
### SKIP_SHA512
|
||||
Skip SHA512 hash check for file.
|
||||
|
||||
|
29
docs/maintainers/vcpkg_execute_in_download_mode.md
Normal file
29
docs/maintainers/vcpkg_execute_in_download_mode.md
Normal file
@ -0,0 +1,29 @@
|
||||
# vcpkg_execute_in_download_mode
|
||||
|
||||
Execute a process even in download mode.
|
||||
|
||||
## Usage
|
||||
```cmake
|
||||
vcpkg_execute_in_download_mode(
|
||||
COMMAND <cmd> [<arguments>...]
|
||||
OUTPUT_QUIET ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY <dir>
|
||||
TIMEOUT <seconds>
|
||||
RESULT_VARIABLE <seconds>
|
||||
OUTPUT_VARIABLE <var_out>
|
||||
ERROR_VARIABLE <var_err>
|
||||
INPUT_FILE <f_in>
|
||||
OUTPUT_FILE <f_out>
|
||||
ERROR_FILE <f_err>
|
||||
ENCODING <enc>
|
||||
)
|
||||
```
|
||||
|
||||
The signature of this function is identical with `execute_process()` except that
|
||||
it only accepts one COMMAND argument, i.e., does not support chaining multiple
|
||||
commands with pipes.
|
||||
|
||||
See `execute_process()` for a detailed description of the parameters.
|
||||
|
||||
## Source
|
||||
[scripts/cmake/vcpkg_execute_in_download_mode.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_execute_in_download_mode.cmake)
|
@ -8,6 +8,9 @@ vcpkg_execute_required_process(
|
||||
COMMAND <${PERL}> [<arguments>...]
|
||||
WORKING_DIRECTORY <${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg>
|
||||
LOGNAME <build-${TARGET_TRIPLET}-dbg>
|
||||
[TIMEOUT <seconds>]
|
||||
[OUTPUT_VARIABLE <var>]
|
||||
[ERROR_VARIABLE <var>]
|
||||
)
|
||||
```
|
||||
## Parameters
|
||||
@ -24,6 +27,15 @@ The directory to execute the command in.
|
||||
### LOGNAME
|
||||
The prefix to use for the log files.
|
||||
|
||||
### TIMEOUT
|
||||
Optional timeout after which to terminate the command.
|
||||
|
||||
### OUTPUT_VARIABLE
|
||||
Optional variable to receive stdout of the command.
|
||||
|
||||
### ERROR_VARIABLE
|
||||
Optional variable to receive stderr of the command.
|
||||
|
||||
This should be a unique name for different triplets so that the logs don't conflict when building multiple at once.
|
||||
|
||||
## Examples
|
||||
|
@ -34,6 +34,7 @@ The current list of programs includes:
|
||||
- NINJA
|
||||
- NUGET
|
||||
- SCONS
|
||||
- SWIG
|
||||
- YASM
|
||||
|
||||
Note that msys2 has a dedicated helper function: [`vcpkg_acquire_msys`](vcpkg_acquire_msys.md).
|
||||
|
14
docs/maintainers/vcpkg_find_fortran.md
Normal file
14
docs/maintainers/vcpkg_find_fortran.md
Normal file
@ -0,0 +1,14 @@
|
||||
# vcpkg_find_fortran
|
||||
|
||||
Checks if a Fortran compiler can be found.
|
||||
Windows(x86/x64) Only: If not it will switch/enable MinGW gfortran
|
||||
and return required cmake args for building.
|
||||
|
||||
## Usage
|
||||
```cmake
|
||||
vcpkg_find_fortran(<additional_cmake_args_out>
|
||||
)
|
||||
```
|
||||
|
||||
## Source
|
||||
[scripts/cmake/vcpkg_find_fortran.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_find_fortran.cmake)
|
@ -8,6 +8,8 @@ vcpkg_fixup_pkgconfig(
|
||||
[RELEASE_FILES <PATHS>...]
|
||||
[DEBUG_FILES <PATHS>...]
|
||||
[SYSTEM_LIBRARIES <NAMES>...]
|
||||
[IGNORE_FLAGS <FLAGS>]
|
||||
[SKIP_CHECK]
|
||||
)
|
||||
```
|
||||
|
||||
@ -20,10 +22,6 @@ Defaults to every *.pc file in the folder ${CURRENT_PACKAGES_DIR} without ${CURR
|
||||
Specifies a list of files to apply the fixes for debug paths.
|
||||
Defaults to every *.pc file in the folder ${CURRENT_PACKAGES_DIR}/debug/
|
||||
|
||||
### SYSTEM_PACKAGES
|
||||
If the *.pc file contains system packages outside vcpkg these need to be listed here.
|
||||
Since vcpkg checks the existence of all required packages within vcpkg.
|
||||
|
||||
### SYSTEM_LIBRARIES
|
||||
If the *.pc file contains system libraries outside vcpkg these need to be listed here.
|
||||
VCPKG checks every -l flag for the existence of the required library within vcpkg.
|
||||
@ -31,11 +29,13 @@ VCPKG checks every -l flag for the existence of the required library within vcpk
|
||||
### IGNORE_FLAGS
|
||||
If the *.pc file contains flags in the lib field which are not libraries. These can be listed here
|
||||
|
||||
### SKIP_CHECK
|
||||
Skips the library checks in vcpkg_fixup_pkgconfig. Only use if the script itself has unhandled cases.
|
||||
|
||||
## Notes
|
||||
Still work in progress. If there are more cases which can be handled here feel free to add them
|
||||
|
||||
## Examples
|
||||
|
||||
Just call vcpkg_fixup_pkgconfig() after any install step which installs *.pc files.
|
||||
|
||||
## Source
|
||||
|
@ -55,6 +55,9 @@ This field should contain the scheme, host, and port of the desired URL without
|
||||
### AUTHORIZATION_TOKEN
|
||||
A token to be passed via the Authorization HTTP header as "token ${AUTHORIZATION_TOKEN}".
|
||||
|
||||
### FILE_DISAMBIGUATOR
|
||||
A token to uniquely identify the resulting filename if the SHA512 changes even though a git ref does not, to avoid stepping on the same file name.
|
||||
|
||||
## Notes:
|
||||
At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present.
|
||||
|
||||
|
@ -7,6 +7,7 @@ Build and install a msvc makefile project.
|
||||
vcpkg_install_nmake(
|
||||
SOURCE_PATH <${SOURCE_PATH}>
|
||||
[NO_DEBUG]
|
||||
[TARGET <all>]
|
||||
PROJECT_SUBPATH <${SUBPATH}>
|
||||
PROJECT_NAME <${MAKEFILE_NAME}>
|
||||
[PRERUN_SHELL <${SHELL_PATH}>]
|
||||
|
29
docs/maintainers/vcpkg_internal_get_cmake_vars.md
Normal file
29
docs/maintainers/vcpkg_internal_get_cmake_vars.md
Normal file
@ -0,0 +1,29 @@
|
||||
# vcpkg_internal_get_cmake_vars
|
||||
|
||||
**Only for internal use in vcpkg helpers. Behavior and arguments will change without notice.**
|
||||
Runs a cmake configure with a dummy project to extract certain cmake variables
|
||||
|
||||
## Usage
|
||||
```cmake
|
||||
vcpkg_internal_get_cmake_vars(
|
||||
[OUTPUT_FILE <output_file_with_vars>]
|
||||
[OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...]
|
||||
)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
### OPTIONS
|
||||
Additional options to pass to the test configure call
|
||||
|
||||
### OUTPUT_FILE
|
||||
Variable to return the path to the generated cmake file with the detected `CMAKE_` variables set as `VCKPG_DETECTED_`
|
||||
|
||||
## Notes
|
||||
If possible avoid usage in portfiles.
|
||||
|
||||
## Examples
|
||||
|
||||
* [vcpkg_configure_make](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_make.cmake)
|
||||
|
||||
## Source
|
||||
[scripts/cmake/vcpkg_internal_get_cmake_vars.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_internal_get_cmake_vars.cmake)
|
@ -1,6 +1,10 @@
|
||||
--- a/nmake.opt Fri Dec 14 22:34:20 2018
|
||||
+++ b/nmake.opt Wed Mar 27 11:00:00 2019
|
||||
@@ -133,7 +133,17 @@
|
||||
diff --git a/nmake.opt b/nmake.opt
|
||||
index 88e197c..308eddd 100644
|
||||
--- a/nmake.opt
|
||||
+++ b/nmake.opt
|
||||
@@ -147,11 +147,21 @@ CXX_PDB_FLAGS=/Zi /Fd$(GDAL_PDB)
|
||||
CXX_PDB_FLAGS=
|
||||
!ENDIF
|
||||
|
||||
+# Flags to choose CRT variant to link against (e.g. static: /MT, /MTd, dynamic: /MD, /MDd)
|
||||
+# Ensure MRSID_CONFIG in mrsid/nmake.opt is set appropriately as well
|
||||
@ -14,9 +18,11 @@
|
||||
+
|
||||
!IFNDEF OPTFLAGS
|
||||
!IF "$(DEBUG)" == "0"
|
||||
-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG
|
||||
+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG
|
||||
-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP$(CPU_COUNT) /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG
|
||||
+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP$(CPU_COUNT) $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG
|
||||
!ELSE
|
||||
-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MDd /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG
|
||||
+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG
|
||||
-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP$(CPU_COUNT) /MDd /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG
|
||||
+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP$(CPU_COUNT) $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG
|
||||
!ENDIF
|
||||
!ENDIF # OPTFLAGS
|
||||
|
||||
|
38
ports/gdal/0002-Fix-build.patch
Normal file
38
ports/gdal/0002-Fix-build.patch
Normal file
@ -0,0 +1,38 @@
|
||||
diff --git a/makefile.vc b/makefile.vc
|
||||
index 9e0bd44..8559f79 100644
|
||||
--- a/makefile.vc
|
||||
+++ b/makefile.vc
|
||||
@@ -84,7 +84,7 @@ staticlib: $(LIB_DEPENDS)
|
||||
call <<clean_main_build_output.bat
|
||||
$(CLEAN_MAIN_BUILD_OUTPUT_CMDS)
|
||||
<<
|
||||
- lib /nologo /out:$(GDAL_LIB_NAME) $(LIBOBJ) $(EXTERNAL_LIBS)
|
||||
+ lib /nologo /LTCG /out:$(GDAL_LIB_NAME) $(LIBOBJ) $(EXTERNAL_LIBS)
|
||||
|
||||
appslib-target:
|
||||
cd apps
|
||||
@@ -204,9 +204,6 @@ dll: $(GDAL_DLL)
|
||||
|
||||
# build using cygwin
|
||||
docs:
|
||||
-!IFDEF HTMLDIR
|
||||
- make PYTHONHOME= -C doc html
|
||||
-!ENDIF
|
||||
|
||||
bindings:
|
||||
-for %d in ( $(BINDINGS) ) do \
|
||||
@@ -236,12 +233,8 @@ install: default docs
|
||||
cd ..\apps
|
||||
$(MAKE) /f makefile.vc install
|
||||
cd ..
|
||||
- $(INSTALL) data\*.* $(DATADIR)
|
||||
- $(INSTALL) LICENSE.TXT $(DATADIR)
|
||||
-!IFDEF HTMLDIR
|
||||
- -mkdir $(HTMLDIR)
|
||||
- xcopy /S /Y doc\build\html $(HTMLDIR)
|
||||
-!ENDIF
|
||||
+ $(INSTALL) data\*.* "$(DATADIR)"
|
||||
+ $(INSTALL) LICENSE.TXT "$(DATADIR)"
|
||||
!IFDEF INCLUDE_OGR_FRMTS
|
||||
cd ogr\ogrsf_frmts
|
||||
$(MAKE) /f makefile.vc plugins-install
|
@ -1,27 +0,0 @@
|
||||
--- a/makefile.vc Fri Dec 14 22:34:20 2018
|
||||
+++ b/makefile.vc Wed Mar 27 11:00:00 2019
|
||||
@@ -60,3 +60,3 @@
|
||||
|
||||
-default: $(TARGET_LIB) $(PLUGIN_TARGET) apps_dir
|
||||
+default: $(TARGET_LIB) $(PLUGIN_TARGET)
|
||||
|
||||
@@ -227,4 +227,2 @@
|
||||
$(MAKE) /f makefile.vc plugins-install
|
||||
- cd ..\apps
|
||||
- $(MAKE) /f makefile.vc install
|
||||
cd ..
|
||||
@@ -232,8 +230,2 @@
|
||||
$(INSTALL) LICENSE.TXT $(DATADIR)
|
||||
-!IFDEF HTMLDIR
|
||||
- -mkdir $(HTMLDIR)
|
||||
- cd frmts
|
||||
- $(MAKE) /f makefile.vc html-install
|
||||
- cd ..
|
||||
-!ENDIF
|
||||
!IFDEF INCLUDE_OGR_FRMTS
|
||||
@@ -241,5 +233,2 @@
|
||||
$(MAKE) /f makefile.vc plugins-install
|
||||
-!IFDEF HTMLDIR
|
||||
- $(MAKE) /f makefile.vc html-install
|
||||
-!ENDIF
|
||||
cd ..\..
|
22
ports/gdal/0003-Fix-static-build.patch
Normal file
22
ports/gdal/0003-Fix-static-build.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git a/makefile.vc b/makefile.vc
|
||||
index 8559f79..87f8fc9 100644
|
||||
--- a/makefile.vc
|
||||
+++ b/makefile.vc
|
||||
@@ -61,7 +61,7 @@ TARGET_LIB = staticlib
|
||||
|
||||
DEFAULT_TARGETS =
|
||||
|
||||
-default: $(TARGET_LIB) $(PLUGIN_TARGET) apps_dir
|
||||
+default: $(TARGET_LIB) $(PLUGIN_TARGET)
|
||||
|
||||
# Batch commands to clean main build output are stored in a macro so they can be reused by different
|
||||
# targets in an inline temporary batch file.
|
||||
@@ -230,8 +230,6 @@ install: default docs
|
||||
if exist $(GDAL_DLL) $(INSTALL) $(GDAL_DLL) $(BINDIR)
|
||||
cd frmts
|
||||
$(MAKE) /f makefile.vc plugins-install
|
||||
- cd ..\apps
|
||||
- $(MAKE) /f makefile.vc install
|
||||
cd ..
|
||||
$(INSTALL) data\*.* "$(DATADIR)"
|
||||
$(INSTALL) LICENSE.TXT "$(DATADIR)"
|
@ -1,10 +0,0 @@
|
||||
--- a/ogrlinestring.cpp Fri Dec 14 22:34:20 2018
|
||||
+++ b/ogrlinestring.cpp Wed Mar 27 11:00:00 2019
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <cstdlib>
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
+#include <cmath>
|
||||
|
||||
CPL_CVSID("$Id: ogrlinestring.cpp 61153d33d7f055c3442ff728adbfa8e09582464b 2019-03-10 14:23:51 +0100 Even Rouault $")
|
||||
|
12
ports/gdal/0004-Fix-std-fabs.patch
Normal file
12
ports/gdal/0004-Fix-std-fabs.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/ogr/ogrlinestring.cpp b/ogr/ogrlinestring.cpp
|
||||
index 1e16d9f..cf7ced1 100644
|
||||
--- a/ogr/ogrlinestring.cpp
|
||||
+++ b/ogr/ogrlinestring.cpp
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <cstdlib>
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
+#include <cmath>
|
||||
|
||||
CPL_CVSID("$Id: ogrlinestring.cpp ad9178b63f501e9840d86a3220c9e5100c6e3fa2 2019-10-21 13:19:06 +0200 Even Rouault $")
|
||||
|
13
ports/gdal/0005-Fix-cfitsio.patch
Normal file
13
ports/gdal/0005-Fix-cfitsio.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/frmts/fits/fitsdataset.cpp b/frmts/fits/fitsdataset.cpp
|
||||
index 4f41a12..723d211 100644
|
||||
--- a/frmts/fits/fitsdataset.cpp
|
||||
+++ b/frmts/fits/fitsdataset.cpp
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "ogr_spatialref.h"
|
||||
|
||||
#include <string.h>
|
||||
-#include <fitsio.h>
|
||||
+#include <cfitsio/fitsio.h>
|
||||
|
||||
#include <string>
|
||||
#include <cstring>
|
@ -1,9 +1,8 @@
|
||||
Source: gdal
|
||||
Version: 2.4.1
|
||||
Port-Version: 14
|
||||
Version: 3.1.3
|
||||
Homepage: https://gdal.org/
|
||||
Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data.
|
||||
Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, openjpeg, libwebp, libxml2, liblzma, netcdf-c, hdf5, zlib
|
||||
Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, openjpeg, libwebp, libxml2, liblzma, netcdf-c, hdf5, zlib, libgeotiff, cfitsio, json-c (!windows)
|
||||
Supports: !arm
|
||||
|
||||
Feature: mysql-libmariadb
|
||||
|
120
ports/gdal/dependency_win.cmake
Normal file
120
ports/gdal/dependency_win.cmake
Normal file
@ -0,0 +1,120 @@
|
||||
macro(find_dependency_win)
|
||||
# Setup proj4 libraries + include path
|
||||
set(PROJ_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include")
|
||||
set(PROJ_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/proj.lib")
|
||||
set(PROJ_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/proj_d.lib")
|
||||
|
||||
# Setup libpng libraries + include path
|
||||
set(PNG_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include")
|
||||
set(PNG_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libpng16.lib" )
|
||||
set(PNG_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.lib" )
|
||||
|
||||
# Setup zlib libraries + include path
|
||||
set(ZLIB_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" )
|
||||
set(ZLIB_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/zlib.lib" )
|
||||
set(ZLIB_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib" )
|
||||
|
||||
# Setup geos libraries + include path
|
||||
set(GEOS_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" )
|
||||
set(GEOS_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib" )
|
||||
set(GEOS_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib" )
|
||||
|
||||
# Setup expat libraries + include path
|
||||
set(EXPAT_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" )
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
if (VCPKG_CRT_LINKAGE STREQUAL dynamic)
|
||||
set(EXPAT_SUFFIX "MT")
|
||||
else()
|
||||
set(EXPAT_SUFFIX "MD")
|
||||
endif()
|
||||
set(EXPAT_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libexpat${EXPAT_SUFFIX}.lib" )
|
||||
set(EXPAT_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libexpatd${EXPAT_SUFFIX}.lib" )
|
||||
else()
|
||||
set(EXPAT_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libexpat.lib" )
|
||||
set(EXPAT_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libexpatd.lib" )
|
||||
endif()
|
||||
|
||||
# Setup curl libraries + include path
|
||||
set(CURL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" )
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/libcurl.lib")
|
||||
set(CURL_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libcurl.lib" )
|
||||
elseif(EXISTS "${CURRENT_INSTALLED_DIR}/lib/libcurl_imp.lib")
|
||||
set(CURL_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libcurl_imp.lib" )
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d.lib")
|
||||
set(CURL_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d.lib" )
|
||||
elseif(EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d_imp.lib")
|
||||
set(CURL_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d_imp.lib" )
|
||||
endif()
|
||||
|
||||
# Setup sqlite3 libraries + include path
|
||||
set(SQLITE_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" )
|
||||
set(SQLITE_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/sqlite3.lib" )
|
||||
set(SQLITE_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/sqlite3.lib" )
|
||||
|
||||
# Setup PostgreSQL libraries + include path
|
||||
set(PGSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" )
|
||||
set(PGSQL_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libpq.lib" )
|
||||
set(PGSQL_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libpq.lib" )
|
||||
|
||||
set(TMP_REL "${CURRENT_INSTALLED_DIR}/lib/libpgcommon.lib" )
|
||||
set(TMP_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libpgcommon.lib" )
|
||||
set(PGSQL_LIBRARY_REL "${PGSQL_LIBRARY_REL} ${TMP_REL}")
|
||||
set(PGSQL_LIBRARY_DBG "${PGSQL_LIBRARY_DBG} ${TMP_DBG}")
|
||||
|
||||
set(TMP_REL "${CURRENT_INSTALLED_DIR}/lib/libpgport.lib" )
|
||||
set(TMP_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libpgport.lib" )
|
||||
set(PGSQL_LIBRARY_REL "${PGSQL_LIBRARY_REL} ${TMP_REL}")
|
||||
set(PGSQL_LIBRARY_DBG "${PGSQL_LIBRARY_DBG} ${TMP_DBG}")
|
||||
|
||||
# Setup OpenJPEG libraries + include path
|
||||
set(OPENJPEG_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" )
|
||||
set(OPENJPEG_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/openjp2.lib" )
|
||||
set(OPENJPEG_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/openjp2.lib" )
|
||||
|
||||
# Setup WebP libraries + include path
|
||||
set(WEBP_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" )
|
||||
set(WEBP_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/webp.lib" )
|
||||
set(WEBP_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/webpd.lib" )
|
||||
|
||||
# Setup libxml2 libraries + include path
|
||||
set(XML2_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" )
|
||||
set(XML2_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib" )
|
||||
set(XML2_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib" )
|
||||
|
||||
# Setup liblzma libraries + include path
|
||||
set(LZMA_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include" )
|
||||
set(LZMA_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/lzma.lib" )
|
||||
set(LZMA_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/lzmad.lib" )
|
||||
|
||||
# Setup openssl libraries path
|
||||
set(OPENSSL_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libcrypto.lib ${CURRENT_INSTALLED_DIR}/lib/libssl.lib" )
|
||||
set(OPENSSL_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libcrypto.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libssl.lib" )
|
||||
|
||||
# Setup libiconv libraries path
|
||||
set(ICONV_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/iconv.lib ${CURRENT_INSTALLED_DIR}/lib/charset.lib" )
|
||||
set(ICONV_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/iconv.lib ${CURRENT_INSTALLED_DIR}/debug/lib/charset.lib" )
|
||||
|
||||
if("mysql-libmysql" IN_LIST FEATURES OR "mysql-libmariadb" IN_LIST FEATURES)
|
||||
# Setup MySQL libraries + include path
|
||||
if("mysql-libmysql" IN_LIST FEATURES)
|
||||
set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql" )
|
||||
set(MYSQL_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libmysql.lib" )
|
||||
set(MYSQL_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libmysql.lib" )
|
||||
endif()
|
||||
|
||||
if("mysql-libmariadb" IN_LIST FEATURES)
|
||||
set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql" )
|
||||
set(MYSQL_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/libmariadb.lib" )
|
||||
set(MYSQL_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libmariadb.lib" )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if ("libspatialite" IN_LIST FEATURES)
|
||||
# Setup spatialite libraries + include path
|
||||
set(SPATIALITE_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/spatialite" )
|
||||
set(SPATIALITE_LIBRARY_REL "${CURRENT_INSTALLED_DIR}/lib/spatialite.lib" )
|
||||
set(SPATIALITE_LIBRARY_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/spatialite.lib" )
|
||||
set(HAVE_SPATIALITE "-DHAVE_SPATIALITE")
|
||||
endif()
|
||||
endmacro()
|
@ -1,186 +1,45 @@
|
||||
# NOTE: update the version and checksum for new GDAL release
|
||||
set(GDAL_VERSION_STR "2.4.1")
|
||||
set(GDAL_VERSION_PKG "241")
|
||||
set(GDAL_VERSION_LIB "204")
|
||||
set(GDAL_PACKAGE_SUM "edb9679ee6788334cf18971c803615ac9b1c72bc0c96af8fd4852cb7e8f58e9c4f3d9cb66406bc8654419612e1a7e9d0e62f361712215f4a50120f646bb0a738")
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/dependency_win.cmake)
|
||||
#include(${CMAKE_CURRENT_LIST_DIR}/dependency_unix.cmake)
|
||||
|
||||
vcpkg_fail_port_install(ON_ARCH "arm")
|
||||
|
||||
# NOTE: update the version and checksum for new GDAL release
|
||||
set(GDAL_VERSION_STR "3.1.3")
|
||||
set(GDAL_VERSION_PKG "313")
|
||||
set(GDAL_VERSION_LIB "204")
|
||||
set(GDAL_PACKAGE_SUM "a6dad37813eecb5e0c888ec940cf7f83c5096e69e4f33a3e5a5557542e7f656b9726e470e1b5d3d035de53df065510931a436a8c889f1366abd630c1cf5dfb49")
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://download.osgeo.org/gdal/${GDAL_VERSION_STR}/gdal${GDAL_VERSION_PKG}.zip"
|
||||
FILENAME "gdal${GDAL_VERSION_PKG}.zip"
|
||||
SHA512 ${GDAL_PACKAGE_SUM}
|
||||
)
|
||||
|
||||
# Extract source into architecture specific directory, because GDALs' nmake based build currently does not
|
||||
# support out of source builds.
|
||||
set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/gdal-${GDAL_VERSION_STR})
|
||||
set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/gdal-${GDAL_VERSION_STR})
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
list(APPEND BUILD_TYPES "release")
|
||||
endif()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
list(APPEND BUILD_TYPES "debug")
|
||||
set(GDAL_PATCHES 0001-Fix-debug-crt-flags.patch 0002-Fix-build.patch)
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
list(APPEND GDAL_PATCHES 0003-Fix-static-build.patch)
|
||||
endif()
|
||||
list(APPEND GDAL_PATCHES 0004-Fix-std-fabs.patch 0005-Fix-cfitsio.patch)
|
||||
|
||||
foreach(BUILD_TYPE IN LISTS BUILD_TYPES)
|
||||
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE})
|
||||
vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE})
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-${GDAL_VERSION_STR}
|
||||
PATCHES
|
||||
0001-Fix-debug-crt-flags.patch
|
||||
0002-Fix-static-build.patch
|
||||
)
|
||||
else()
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-${GDAL_VERSION_STR}
|
||||
PATCHES
|
||||
0001-Fix-debug-crt-flags.patch
|
||||
)
|
||||
endif()
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-${GDAL_VERSION_STR}/ogr
|
||||
PATCHES
|
||||
0003-Fix-std-fabs.patch
|
||||
)
|
||||
endforeach()
|
||||
vcpkg_extract_source_archive_ex(
|
||||
ARCHIVE ${ARCHIVE}
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
PATCHES ${GDAL_PATCHES}
|
||||
)
|
||||
|
||||
if (VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
|
||||
# Check build system first
|
||||
find_program(NMAKE nmake REQUIRED)
|
||||
if (VCPKG_TARGET_IS_WINDOWS)
|
||||
set(NATIVE_DATA_DIR "${CURRENT_PACKAGES_DIR}/share/gdal")
|
||||
set(NATIVE_HTML_DIR "${CURRENT_PACKAGES_DIR}/share/gdal/html")
|
||||
|
||||
file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR)
|
||||
file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/share/gdal" NATIVE_DATA_DIR)
|
||||
file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/share/gdal/html" NATIVE_HTML_DIR)
|
||||
|
||||
# Setup proj4 libraries + include path
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" PROJ_INCLUDE_DIR)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/proj.lib" PROJ_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/proj_d.lib" PROJ_LIBRARY_DBG)
|
||||
|
||||
# Setup libpng libraries + include path
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" PNG_INCLUDE_DIR)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libpng16.lib" PNG_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.lib" PNG_LIBRARY_DBG)
|
||||
|
||||
# Setup zlib libraries + include path
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" ZLIB_INCLUDE_DIR)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/zlib.lib" ZLIB_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib" ZLIB_LIBRARY_DBG)
|
||||
|
||||
# Setup geos libraries + include path
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" GEOS_INCLUDE_DIR)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib ${CURRENT_INSTALLED_DIR}/lib/geos.lib" GEOS_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib ${CURRENT_INSTALLED_DIR}/debug/lib/geosd.lib" GEOS_LIBRARY_DBG)
|
||||
else()
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib" GEOS_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib" GEOS_LIBRARY_DBG)
|
||||
endif()
|
||||
|
||||
# Setup expat libraries + include path
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" EXPAT_INCLUDE_DIR)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libexpatMD.lib" EXPAT_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libexpatdMD.lib" EXPAT_LIBRARY_DBG)
|
||||
else()
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libexpat.lib" EXPAT_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libexpatd.lib" EXPAT_LIBRARY_DBG)
|
||||
endif()
|
||||
|
||||
# Setup curl libraries + include path
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" CURL_INCLUDE_DIR)
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/libcurl.lib")
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libcurl.lib" CURL_LIBRARY_REL)
|
||||
elseif(EXISTS "${CURRENT_INSTALLED_DIR}/lib/libcurl_imp.lib")
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libcurl_imp.lib" CURL_LIBRARY_REL)
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d.lib")
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d.lib" CURL_LIBRARY_DBG)
|
||||
elseif(EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d_imp.lib")
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d_imp.lib" CURL_LIBRARY_DBG)
|
||||
endif()
|
||||
|
||||
# Setup sqlite3 libraries + include path
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" SQLITE_INCLUDE_DIR)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/sqlite3.lib" SQLITE_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/sqlite3.lib" SQLITE_LIBRARY_DBG)
|
||||
|
||||
# Setup PostgreSQL libraries + include path
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" PGSQL_INCLUDE_DIR)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libpq.lib" PGSQL_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libpq.lib" PGSQL_LIBRARY_DBG)
|
||||
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libpgcommon.lib" TMP_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libpgcommon.lib" TMP_DBG)
|
||||
set(PGSQL_LIBRARY_REL "${PGSQL_LIBRARY_REL} ${TMP_REL}")
|
||||
set(PGSQL_LIBRARY_DBG "${PGSQL_LIBRARY_DBG} ${TMP_DBG}")
|
||||
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libpgport.lib" TMP_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libpgport.lib" TMP_DBG)
|
||||
set(PGSQL_LIBRARY_REL "${PGSQL_LIBRARY_REL} ${TMP_REL}")
|
||||
set(PGSQL_LIBRARY_DBG "${PGSQL_LIBRARY_DBG} ${TMP_DBG}")
|
||||
|
||||
# Setup OpenJPEG libraries + include path
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" OPENJPEG_INCLUDE_DIR)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/openjp2.lib" OPENJPEG_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/openjp2.lib" OPENJPEG_LIBRARY_DBG)
|
||||
|
||||
# Setup WebP libraries + include path
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" WEBP_INCLUDE_DIR)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/webp.lib" WEBP_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/webpd.lib" WEBP_LIBRARY_DBG)
|
||||
|
||||
# Setup libxml2 libraries + include path
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" XML2_INCLUDE_DIR)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib" XML2_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib" XML2_LIBRARY_DBG)
|
||||
|
||||
# Setup liblzma libraries + include path
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" LZMA_INCLUDE_DIR)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/lzma.lib" LZMA_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/lzmad.lib" LZMA_LIBRARY_DBG)
|
||||
|
||||
# Setup openssl libraries path
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libcrypto.lib ${CURRENT_INSTALLED_DIR}/lib/libssl.lib" OPENSSL_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libcrypto.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libssl.lib" OPENSSL_LIBRARY_DBG)
|
||||
|
||||
# Setup libiconv libraries path
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/iconv.lib ${CURRENT_INSTALLED_DIR}/lib/charset.lib" ICONV_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/iconv.lib ${CURRENT_INSTALLED_DIR}/debug/lib/charset.lib" ICONV_LIBRARY_DBG)
|
||||
find_dependency_win()
|
||||
|
||||
if("mysql-libmysql" IN_LIST FEATURES OR "mysql-libmariadb" IN_LIST FEATURES)
|
||||
# Setup MySQL libraries + include path
|
||||
if("mysql-libmysql" IN_LIST FEATURES)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include/mysql" MYSQL_INCLUDE_DIR)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libmysql.lib" MYSQL_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libmysql.lib" MYSQL_LIBRARY_DBG)
|
||||
endif()
|
||||
|
||||
if("mysql-libmariadb" IN_LIST FEATURES)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include/mysql" MYSQL_INCLUDE_DIR)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libmariadb.lib" MYSQL_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libmariadb.lib" MYSQL_LIBRARY_DBG)
|
||||
endif()
|
||||
|
||||
list(APPEND NMAKE_OPTIONS MYSQL_INC_DIR=${MYSQL_INCLUDE_DIR})
|
||||
list(APPEND NMAKE_OPTIONS_REL MYSQL_LIB=${MYSQL_LIBRARY_REL})
|
||||
list(APPEND NMAKE_OPTIONS_DBG MYSQL_LIB=${MYSQL_LIBRARY_DBG})
|
||||
endif()
|
||||
|
||||
if ("libspatialite" IN_LIST FEATURES)
|
||||
# Setup spatialite libraries + include path
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include/spatialite" SPATIALITE_INCLUDE_DIR)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/spatialite.lib" SPATIALITE_LIBRARY_REL)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/spatialite.lib" SPATIALITE_LIBRARY_DBG)
|
||||
set(HAVE_SPATIALITE "-DHAVE_SPATIALITE")
|
||||
endif()
|
||||
|
||||
list(APPEND NMAKE_OPTIONS
|
||||
GDAL_HOME=${NATIVE_PACKAGES_DIR}
|
||||
DATADIR=${NATIVE_DATA_DIR}
|
||||
HTMLDIR=${NATIVE_HTML_DIR}
|
||||
GEOS_DIR=${GEOS_INCLUDE_DIR}
|
||||
@ -227,6 +86,7 @@ if (VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
|
||||
|
||||
list(APPEND NMAKE_OPTIONS_REL
|
||||
${NMAKE_OPTIONS}
|
||||
GDAL_HOME=${CURRENT_PACKAGES_DIR}
|
||||
CXX_CRT_FLAGS=${LINKAGE_FLAGS}
|
||||
PROJ_LIBRARY=${PROJ_LIBRARY_REL}
|
||||
PNG_LIB=${PNG_LIBRARY_REL}
|
||||
@ -243,6 +103,7 @@ if (VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
|
||||
|
||||
list(APPEND NMAKE_OPTIONS_DBG
|
||||
${NMAKE_OPTIONS}
|
||||
GDAL_HOME=${CURRENT_PACKAGES_DIR}/debug
|
||||
CXX_CRT_FLAGS="${LINKAGE_FLAGS}d"
|
||||
PROJ_LIBRARY=${PROJ_LIBRARY_DBG}
|
||||
PNG_LIB=${PNG_LIBRARY_DBG}
|
||||
@ -259,175 +120,94 @@ if (VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
|
||||
)
|
||||
|
||||
# Begin build process
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
################
|
||||
# Release build
|
||||
################
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-rel")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${NMAKE} -f makefile.vc
|
||||
${NMAKE_OPTIONS_REL}
|
||||
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
|
||||
LOGNAME nmake-build-${TARGET_TRIPLET}-release
|
||||
)
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-rel done")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
################
|
||||
# Debug build
|
||||
################
|
||||
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-dbg")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${NMAKE} /G -f makefile.vc
|
||||
${NMAKE_OPTIONS_DBG}
|
||||
WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
|
||||
LOGNAME nmake-build-${TARGET_TRIPLET}-debug
|
||||
)
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-dbg done")
|
||||
endif()
|
||||
|
||||
message(STATUS "Packaging ${TARGET_TRIPLET}")
|
||||
vcpkg_install_nmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
TARGET devinstall
|
||||
OPTIONS_RELEASE
|
||||
"${NMAKE_OPTIONS_REL}"
|
||||
OPTIONS_DEBUG
|
||||
"${NMAKE_OPTIONS_DBG}"
|
||||
)
|
||||
|
||||
if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/gdal/html)
|
||||
endif()
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${NMAKE} -f makefile.vc
|
||||
${NMAKE_OPTIONS_REL}
|
||||
install
|
||||
devinstall
|
||||
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
|
||||
LOGNAME nmake-install-${TARGET_TRIPLET}
|
||||
)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
file(COPY ${SOURCE_PATH_RELEASE}/gdal.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
file(COPY ${SOURCE_PATH_DEBUG}/gdal.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib)
|
||||
endif()
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
list(APPEND GDAL_EXES
|
||||
gdal_contour
|
||||
gdal_grid
|
||||
gdal_rasterize
|
||||
gdal_translate
|
||||
gdal_viewshed
|
||||
gdaladdo
|
||||
gdalbuildvrt
|
||||
gdaldem
|
||||
gdalenhance
|
||||
gdalinfo
|
||||
gdallocationinfo
|
||||
gdalmanage
|
||||
gdalmdiminfo
|
||||
gdalmdimtranslate
|
||||
gdalserver
|
||||
gdalsrsinfo
|
||||
gdaltindex
|
||||
gdaltransform
|
||||
gdalwarp
|
||||
gnmanalyse
|
||||
gnmmanage
|
||||
nearblack
|
||||
ogr2ogr
|
||||
ogrinfo
|
||||
ogrlineref
|
||||
ogrtindex
|
||||
testepsg
|
||||
)
|
||||
vcpkg_copy_tools(TOOL_NAMES ${GDAL_EXES} AUTO_CLEAN)
|
||||
else()
|
||||
|
||||
set(GDAL_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/gdal)
|
||||
file(MAKE_DIRECTORY ${GDAL_TOOL_PATH})
|
||||
|
||||
file(GLOB GDAL_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe)
|
||||
file(COPY ${GDAL_TOOLS} DESTINATION ${GDAL_TOOL_PATH})
|
||||
file(REMOVE_RECURSE ${GDAL_TOOLS})
|
||||
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/gdal.lib)
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/lib/gdal.lib)
|
||||
endif()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
file(COPY ${SOURCE_PATH_DEBUG}/gdal${GDAL_VERSION_LIB}.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(COPY ${SOURCE_PATH_DEBUG}/gdal_i.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib)
|
||||
endif()
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/share/gdal/html)
|
||||
|
||||
# Copy over PDBs
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/gdal204.pdb)
|
||||
endif()
|
||||
|
||||
elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") # Build in UNIX
|
||||
# Check build system first
|
||||
find_program(MAKE make)
|
||||
if (NOT MAKE)
|
||||
message(FATAL_ERROR "MAKE not found")
|
||||
endif()
|
||||
|
||||
set(ENV{CFLAGS} "$ENV{CFLAGS} -Wno-error=implicit-function-declaration")
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
################
|
||||
# Release build
|
||||
################
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-rel")
|
||||
set(OUT_PATH_RELEASE ${SOURCE_PATH_RELEASE}/../../make-build-${TARGET_TRIPLET}-release)
|
||||
file(MAKE_DIRECTORY ${OUT_PATH_RELEASE})
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND "${SOURCE_PATH_RELEASE}/configure" --prefix=${OUT_PATH_RELEASE}
|
||||
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
|
||||
LOGNAME config-${TARGET_TRIPLET}-rel
|
||||
else()
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
set(BUILD_DYNAMIC yes)
|
||||
set(BUILD_STATIC no)
|
||||
else()
|
||||
set(BUILD_DYNAMIC no)
|
||||
set(BUILD_STATIC yes)
|
||||
endif()
|
||||
|
||||
set(CONF_OPTS --enable-shared=${BUILD_DYNAMIC} --enable-static=${BUILD_STATIC})
|
||||
list(APPEND CONF_OPTS --with-proj=${CURRENT_INSTALLED_DIR} --with-libjson-c=${CURRENT_INSTALLED_DIR})
|
||||
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
AUTOCONFIG
|
||||
COPY_SOURCE
|
||||
OPTIONS ${CONF_OPTS}
|
||||
OPTIONS_DEBUG
|
||||
--enable-debug
|
||||
--without-fit # Disable cfitsio temporary
|
||||
)
|
||||
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-rel")
|
||||
vcpkg_execute_build_process(
|
||||
COMMAND make -j ${VCPKG_CONCURRENCY}
|
||||
NO_PARALLEL_COMMAND make
|
||||
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
|
||||
LOGNAME make-build-${TARGET_TRIPLET}-release
|
||||
|
||||
vcpkg_install_make(MAKEFILE GNUmakefile)
|
||||
|
||||
file(REMOVE_RECURSE
|
||||
${CURRENT_PACKAGES_DIR}/lib/gdalplugins
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib/gdalplugins
|
||||
${CURRENT_PACKAGES_DIR}/debug/share
|
||||
)
|
||||
|
||||
message(STATUS "Installing ${TARGET_TRIPLET}-rel")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND make install
|
||||
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
|
||||
LOGNAME make-install-${TARGET_TRIPLET}-release
|
||||
)
|
||||
|
||||
file(REMOVE_RECURSE ${OUT_PATH_RELEASE}/lib/gdalplugins)
|
||||
file(COPY ${OUT_PATH_RELEASE}/lib/pkgconfig DESTINATION ${OUT_PATH_RELEASE}/share/gdal)
|
||||
file(REMOVE_RECURSE ${OUT_PATH_RELEASE}/lib/pkgconfig)
|
||||
file(COPY ${OUT_PATH_RELEASE}/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(COPY ${OUT_PATH_RELEASE}/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(COPY ${OUT_PATH_RELEASE}/share DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
message(STATUS "Installing ${TARGET_TRIPLET}-rel done")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
################
|
||||
# Debug build
|
||||
################
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg")
|
||||
set(OUT_PATH_DEBUG ${SOURCE_PATH_RELEASE}/../../make-build-${TARGET_TRIPLET}-debug)
|
||||
file(MAKE_DIRECTORY ${OUT_PATH_DEBUG})
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND "${SOURCE_PATH_DEBUG}/configure" --prefix=${OUT_PATH_DEBUG}
|
||||
WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
|
||||
LOGNAME config-${TARGET_TRIPLET}-debug
|
||||
)
|
||||
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-dbg")
|
||||
vcpkg_execute_build_process(
|
||||
COMMAND make -j ${VCPKG_CONCURRENCY}
|
||||
NO_PARALLEL_COMMAND make
|
||||
WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
|
||||
LOGNAME make-build-${TARGET_TRIPLET}-debug
|
||||
)
|
||||
|
||||
message(STATUS "Installing ${TARGET_TRIPLET}-dbg")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND make -j install
|
||||
WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
|
||||
LOGNAME make-install-${TARGET_TRIPLET}-debug
|
||||
)
|
||||
|
||||
file(REMOVE_RECURSE ${OUT_PATH_DEBUG}/lib/gdalplugins)
|
||||
file(REMOVE_RECURSE ${OUT_PATH_DEBUG}/lib/pkgconfig)
|
||||
file(COPY ${OUT_PATH_DEBUG}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug)
|
||||
message(STATUS "Installing ${TARGET_TRIPLET}-dbg done")
|
||||
endif()
|
||||
else() # Other build system
|
||||
message(FATAL_ERROR "Unsupport build system.")
|
||||
endif()
|
||||
|
||||
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY)
|
||||
|
||||
# Handle copyright
|
||||
configure_file(${SOURCE_PATH_RELEASE}/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
@ -1,5 +1,5 @@
|
||||
The package GDAL provides CMake targets:
|
||||
|
||||
find_package(GDAL REQUIRED)
|
||||
target_include_directories(main PRIVATE ${GDAL_INCLUDE_DIR})
|
||||
target_link_libraries(main PRIVATE ${GDAL_LIBRARY})
|
||||
target_include_directories(main PRIVATE ${GDAL_INCLUDE_DIRS})
|
||||
target_link_libraries(main PRIVATE ${GDAL_LIBRARIES})
|
||||
|
@ -3,10 +3,10 @@ include(SelectLibraryConfigurations)
|
||||
|
||||
find_path(GDAL_INCLUDE_DIR NAMES gdal.h HINTS ${CURRENT_INSTALLED_DIR})
|
||||
|
||||
find_library(GDAL_LIBRARY_DEBUG NAMES gdal gdald NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED)
|
||||
find_library(GDAL_LIBRARY_RELEASE NAMES gdal NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED)
|
||||
find_library(GDAL_LIBRARY_DEBUG NAMES gdal_d gdal_i_d gdal NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED)
|
||||
find_library(GDAL_LIBRARY_RELEASE NAMES gdal_i gdal NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED)
|
||||
|
||||
select_library_configurations(GDAL)
|
||||
|
||||
set(GDAL_INCLUDE_DIR ${GDAL_INCLUDE_DIR})
|
||||
set(GDAL_LIBRARY ${GDAL_LIBRARY})
|
||||
set(GDAL_INCLUDE_DIRS ${GDAL_INCLUDE_DIR})
|
||||
set(GDAL_LIBRARIES ${GDAL_LIBRARY})
|
||||
|
@ -1,14 +0,0 @@
|
||||
diff --git a/PDALConfig.cmake.in b/PDALConfig.cmake.in
|
||||
index a03ef142e..2d06a2937 100644
|
||||
--- a/PDALConfig.cmake.in
|
||||
+++ b/PDALConfig.cmake.in
|
||||
@@ -15,6 +15,9 @@ foreach(_dir @PDAL_CONFIG_LIBRARY_DIRS@)
|
||||
list(APPEND PDAL_LIBRARY_DIRS ${_foo})
|
||||
endforeach(_dir)
|
||||
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+find_dependency(GeoTIFF)
|
||||
+find_dependency(CURL)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/PDALTargets.cmake")
|
||||
|
||||
if (WIN32)
|
@ -1,20 +1,19 @@
|
||||
diff --git a/cmake/geos.cmake b/cmake/geos.cmake
|
||||
index 90b79d9..4e144a6 100644
|
||||
index 90b79d9..5942ee5 100644
|
||||
--- a/cmake/geos.cmake
|
||||
+++ b/cmake/geos.cmake
|
||||
@@ -1,7 +1,11 @@
|
||||
@@ -1,8 +1,5 @@
|
||||
#
|
||||
# GEOS (required)
|
||||
#
|
||||
-find_package(GEOS QUIET 3.3)
|
||||
+include(SelectLibraryConfigurations)
|
||||
+find_library(GEOS_LIBRARY_RELEASE NAMES geos_c libgeos_c)
|
||||
+find_library(GEOS_LIBRARY_DEBUG NAMES geos_cd libgeos_cd)
|
||||
+select_library_configurations(GEOS)
|
||||
+find_path(GEOS_INCLUDE_DIR geos_c.h)
|
||||
set_package_properties(GEOS PROPERTIES TYPE REQUIRED
|
||||
PURPOSE "Provides general purpose geometry support")
|
||||
|
||||
-set_package_properties(GEOS PROPERTIES TYPE REQUIRED
|
||||
- PURPOSE "Provides general purpose geometry support")
|
||||
-
|
||||
-include_directories("${GEOS_INCLUDE_DIR}")
|
||||
+find_package(geos CONFIG REQUIRED)
|
||||
+set(GEOS_LIBRARY GEOS::geos GEOS::geos_c GEOS::geos_cxx_flags)
|
||||
\ No newline at end of file
|
||||
diff --git a/cmake/modules/FindPostgreSQL.cmake b/cmake/modules/FindPostgreSQL.cmake
|
||||
index 8178418..31b54d6 100644
|
||||
--- a/cmake/modules/FindPostgreSQL.cmake
|
||||
@ -46,14 +45,18 @@ index 42cca1e..43b0ced 100644
|
||||
add_subdirectory(vendor/kazhdan)
|
||||
if (NOT PDAL_HAVE_JSONCPP)
|
||||
diff --git a/PDALConfig.cmake.in b/PDALConfig.cmake.in
|
||||
index ea695cf..21b66a1 100644
|
||||
index a03ef14..9d073e6 100644
|
||||
--- a/PDALConfig.cmake.in
|
||||
+++ b/PDALConfig.cmake.in
|
||||
@@ -18,6 +18,7 @@ endforeach(_dir)
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(GeoTIFF)
|
||||
find_dependency(CURL)
|
||||
@@ -15,6 +15,11 @@ foreach(_dir @PDAL_CONFIG_LIBRARY_DIRS@)
|
||||
list(APPEND PDAL_LIBRARY_DIRS ${_foo})
|
||||
endforeach(_dir)
|
||||
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+find_dependency(GeoTIFF)
|
||||
+find_dependency(CURL)
|
||||
+find_dependency(Boost COMPONENTS system filesystem)
|
||||
+find_dependency(geos CONFIG)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/PDALTargets.cmake")
|
||||
|
||||
if (WIN32)
|
||||
|
@ -13,7 +13,6 @@ vcpkg_extract_source_archive_ex(
|
||||
0001-win32_compiler_options.cmake.patch
|
||||
0002-no-source-dir-writes.patch
|
||||
0003-fix-copy-vendor.patch
|
||||
PDALConfig.patch
|
||||
fix-dependency.patch
|
||||
libpq.patch
|
||||
fix-CPL_DLL.patch
|
||||
|
@ -3,7 +3,7 @@
|
||||
## Intercepts all calls to execute_process() inside portfiles and fails when Download Mode
|
||||
## is enabled.
|
||||
##
|
||||
## In order to execute a process in Download Mode call `_execute_process()` instead.
|
||||
## In order to execute a process in Download Mode call `vcpkg_execute_in_download_mode()` instead.
|
||||
##
|
||||
if (NOT DEFINED OVERRIDEN_EXECUTE_PROCESS)
|
||||
set(OVERRIDEN_EXECUTE_PROCESS ON)
|
||||
@ -17,4 +17,4 @@ if (NOT DEFINED OVERRIDEN_EXECUTE_PROCESS)
|
||||
execute_process(${ARGV})
|
||||
endmacro()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
@ -7,6 +7,7 @@
|
||||
## vcpkg_build_make([BUILD_TARGET <target>]
|
||||
## [ADD_BIN_TO_PATH]
|
||||
## [ENABLE_INSTALL])
|
||||
## [MAKEFILE <makefileName>]
|
||||
## [LOGFILE_ROOT <logfileroot>])
|
||||
## ```
|
||||
##
|
||||
@ -20,6 +21,9 @@
|
||||
## ### ENABLE_INSTALL
|
||||
## IF the port supports the install target use vcpkg_install_make() instead of vcpkg_build_make()
|
||||
##
|
||||
## ### MAKEFILE
|
||||
## Specifies the Makefile as a relative path from the root of the sources passed to `vcpkg_configure_make()`
|
||||
##
|
||||
## ### BUILD_TARGET
|
||||
## The target passed to the make build command (`./make <target>`). If not specified, the 'all' target will
|
||||
## be passed.
|
||||
@ -49,7 +53,7 @@ function(vcpkg_build_make)
|
||||
include("${_VCPKG_CMAKE_VARS_FILE}")
|
||||
|
||||
# parse parameters such that semicolons in options arguments to COMMAND don't get erased
|
||||
cmake_parse_arguments(PARSE_ARGV 0 _bc "ADD_BIN_TO_PATH;ENABLE_INSTALL;DISABLE_PARALLEL" "LOGFILE_ROOT;BUILD_TARGET;SUBPATH" "")
|
||||
cmake_parse_arguments(PARSE_ARGV 0 _bc "ADD_BIN_TO_PATH;ENABLE_INSTALL;DISABLE_PARALLEL" "LOGFILE_ROOT;BUILD_TARGET;SUBPATH;MAKEFILE" "")
|
||||
|
||||
if(NOT _bc_LOGFILE_ROOT)
|
||||
set(_bc_LOGFILE_ROOT "build")
|
||||
@ -59,6 +63,10 @@ function(vcpkg_build_make)
|
||||
set(_bc_BUILD_TARGET "all")
|
||||
endif()
|
||||
|
||||
if (NOT _bc_MAKEFILE)
|
||||
set(_bc_MAKEFILE Makefile)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(_VCPKG_PREFIX ${CURRENT_PACKAGES_DIR})
|
||||
set(_VCPKG_INSTALLED ${CURRENT_INSTALLED_DIR})
|
||||
@ -76,22 +84,22 @@ function(vcpkg_build_make)
|
||||
vcpkg_acquire_msys(MSYS_ROOT)
|
||||
find_program(MAKE make REQUIRED)
|
||||
set(MAKE_COMMAND "${MAKE}")
|
||||
set(MAKE_OPTS ${_bc_MAKE_OPTIONS} -j ${VCPKG_CONCURRENCY} --trace -f Makefile ${_bc_BUILD_TARGET})
|
||||
set(NO_PARALLEL_MAKE_OPTS ${_bc_MAKE_OPTIONS} -j 1 --trace -f Makefile ${_bc_BUILD_TARGET})
|
||||
set(MAKE_OPTS ${_bc_MAKE_OPTIONS} -j ${VCPKG_CONCURRENCY} --trace -f ${_bc_MAKEFILE} ${_bc_BUILD_TARGET})
|
||||
set(NO_PARALLEL_MAKE_OPTS ${_bc_MAKE_OPTIONS} -j 1 --trace -f ${_bc_MAKEFILE} ${_bc_BUILD_TARGET})
|
||||
|
||||
string(REPLACE " " "\\\ " _VCPKG_PACKAGE_PREFIX ${CURRENT_PACKAGES_DIR})
|
||||
# Don't know why '/cygdrive' is suddenly a requirement here. (at least for x264)
|
||||
string(REGEX REPLACE "([a-zA-Z]):/" "/cygdrive/\\1/" _VCPKG_PACKAGE_PREFIX "${_VCPKG_PACKAGE_PREFIX}")
|
||||
set(INSTALL_OPTS -j ${VCPKG_CONCURRENCY} --trace -f Makefile install DESTDIR=${_VCPKG_PACKAGE_PREFIX})
|
||||
set(INSTALL_OPTS -j ${VCPKG_CONCURRENCY} --trace -f ${_bc_MAKEFILE} install DESTDIR=${_VCPKG_PACKAGE_PREFIX})
|
||||
#TODO: optimize for install-data (release) and install-exec (release/debug)
|
||||
else()
|
||||
# Compiler requriements
|
||||
find_program(MAKE make REQUIRED)
|
||||
set(MAKE_COMMAND "${MAKE}")
|
||||
# Set make command and install command
|
||||
set(MAKE_OPTS ${_bc_MAKE_OPTIONS} V=1 -j ${VCPKG_CONCURRENCY} -f Makefile ${_bc_BUILD_TARGET})
|
||||
set(NO_PARALLEL_MAKE_OPTS ${_bc_MAKE_OPTIONS} V=1 -j 1 -f Makefile ${_bc_BUILD_TARGET})
|
||||
set(INSTALL_OPTS -j ${VCPKG_CONCURRENCY} -f Makefile install DESTDIR=${CURRENT_PACKAGES_DIR})
|
||||
set(MAKE_OPTS ${_bc_MAKE_OPTIONS} V=1 -j ${VCPKG_CONCURRENCY} -f ${_bc_MAKEFILE} ${_bc_BUILD_TARGET})
|
||||
set(NO_PARALLEL_MAKE_OPTS ${_bc_MAKE_OPTIONS} V=1 -j 1 -f ${_bc_MAKEFILE} ${_bc_BUILD_TARGET})
|
||||
set(INSTALL_OPTS -j ${VCPKG_CONCURRENCY} -f ${_bc_MAKEFILE} install DESTDIR=${CURRENT_PACKAGES_DIR})
|
||||
endif()
|
||||
|
||||
# Since includes are buildtype independent those are setup by vcpkg_configure_make
|
||||
|
@ -7,6 +7,7 @@
|
||||
## vcpkg_build_nmake(
|
||||
## SOURCE_PATH <${SOURCE_PATH}>
|
||||
## [NO_DEBUG]
|
||||
## [TARGET <all>]
|
||||
## [PROJECT_SUBPATH <${SUBPATH}>]
|
||||
## [PROJECT_NAME <${MAKEFILE_NAME}>]
|
||||
## [PRERUN_SHELL <${SHELL_PATH}>]
|
||||
@ -75,7 +76,7 @@ function(vcpkg_build_nmake)
|
||||
cmake_parse_arguments(PARSE_ARGV 0 _bn
|
||||
"ADD_BIN_TO_PATH;ENABLE_INSTALL;NO_DEBUG"
|
||||
"SOURCE_PATH;PROJECT_SUBPATH;PROJECT_NAME;LOGFILE_ROOT"
|
||||
"OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG;PRERUN_SHELL;PRERUN_SHELL_DEBUG;PRERUN_SHELL_RELEASE"
|
||||
"OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG;PRERUN_SHELL;PRERUN_SHELL_DEBUG;PRERUN_SHELL_RELEASE;TARGET"
|
||||
)
|
||||
|
||||
if (NOT CMAKE_HOST_WIN32)
|
||||
@ -98,7 +99,6 @@ function(vcpkg_build_nmake)
|
||||
|
||||
set(MAKE )
|
||||
set(MAKE_OPTS_BASE )
|
||||
set(INSTALL_OPTS_BASE )
|
||||
|
||||
find_program(NMAKE nmake REQUIRED)
|
||||
get_filename_component(NMAKE_EXE_PATH ${NMAKE} DIRECTORY)
|
||||
@ -112,8 +112,15 @@ function(vcpkg_build_nmake)
|
||||
set(ENV{INCLUDE} "${CURRENT_INSTALLED_DIR}/include;$ENV{INCLUDE}")
|
||||
# Set make command and install command
|
||||
set(MAKE ${NMAKE} /NOLOGO /G /U)
|
||||
set(MAKE_OPTS_BASE -f ${MAKEFILE_NAME} all)
|
||||
set(INSTALL_OPTS_BASE install)
|
||||
set(MAKE_OPTS_BASE -f ${MAKEFILE_NAME})
|
||||
if (_bn_ENABLE_INSTALL)
|
||||
set(INSTALL_COMMAND install)
|
||||
endif()
|
||||
if (_bn_TARGET)
|
||||
set(MAKE_OPTS_BASE ${MAKE_OPTS_BASE} ${_bn_TARGET} ${INSTALL_COMMAND})
|
||||
else()
|
||||
set(MAKE_OPTS_BASE ${MAKE_OPTS_BASE} all ${INSTALL_COMMAND})
|
||||
endif()
|
||||
# Add subpath to work directory
|
||||
if (_bn_PROJECT_SUBPATH)
|
||||
set(_bn_PROJECT_SUBPATH /${_bn_PROJECT_SUBPATH})
|
||||
@ -134,7 +141,7 @@ function(vcpkg_build_nmake)
|
||||
# Add install command and arguments
|
||||
set(MAKE_OPTS ${MAKE_OPTS_BASE})
|
||||
if (_bn_ENABLE_INSTALL)
|
||||
set(INSTALL_OPTS ${INSTALL_OPTS_BASE} INSTALLDIR=${CURRENT_PACKAGES_DIR}/debug)
|
||||
set(INSTALL_OPTS INSTALLDIR=${CURRENT_PACKAGES_DIR}/debug)
|
||||
set(MAKE_OPTS ${MAKE_OPTS} ${INSTALL_OPTS})
|
||||
endif()
|
||||
set(MAKE_OPTS ${MAKE_OPTS} ${_bn_OPTIONS} ${_bn_OPTIONS_DEBUG})
|
||||
@ -154,7 +161,7 @@ function(vcpkg_build_nmake)
|
||||
# Add install command and arguments
|
||||
set(MAKE_OPTS ${MAKE_OPTS_BASE})
|
||||
if (_bn_ENABLE_INSTALL)
|
||||
set(INSTALL_OPTS ${INSTALL_OPTS_BASE} INSTALLDIR=${CURRENT_PACKAGES_DIR})
|
||||
set(INSTALL_OPTS INSTALLDIR=${CURRENT_PACKAGES_DIR})
|
||||
set(MAKE_OPTS ${MAKE_OPTS} ${INSTALL_OPTS})
|
||||
endif()
|
||||
set(MAKE_OPTS ${MAKE_OPTS} ${_bn_OPTIONS} ${_bn_OPTIONS_RELEASE})
|
||||
|
@ -7,6 +7,7 @@
|
||||
## vcpkg_install_nmake(
|
||||
## SOURCE_PATH <${SOURCE_PATH}>
|
||||
## [NO_DEBUG]
|
||||
## [TARGET <all>]
|
||||
## PROJECT_SUBPATH <${SUBPATH}>
|
||||
## PROJECT_NAME <${MAKEFILE_NAME}>
|
||||
## [PRERUN_SHELL <${SHELL_PATH}>]
|
||||
@ -66,7 +67,7 @@ function(vcpkg_install_nmake)
|
||||
cmake_parse_arguments(PARSE_ARGV 0 _in
|
||||
"NO_DEBUG"
|
||||
"SOURCE_PATH;PROJECT_SUBPATH;PROJECT_NAME"
|
||||
"OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG;PRERUN_SHELL;PRERUN_SHELL_DEBUG;PRERUN_SHELL_RELEASE"
|
||||
"OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG;PRERUN_SHELL;PRERUN_SHELL_DEBUG;PRERUN_SHELL_RELEASE;TARGET"
|
||||
)
|
||||
|
||||
if (NOT CMAKE_HOST_WIN32)
|
||||
@ -77,8 +78,15 @@ function(vcpkg_install_nmake)
|
||||
set(NO_DEBUG NO_DEBUG)
|
||||
endif()
|
||||
|
||||
if (NOT _in_TARGET)
|
||||
set(INSTALL_TARGET "all")
|
||||
else()
|
||||
set(INSTALL_TARGET "${_in_TARGET}")
|
||||
endif()
|
||||
|
||||
vcpkg_build_nmake(LOGFILE_ROOT ENABLE_INSTALL
|
||||
${NO_DEBUG}
|
||||
TARGET "${INSTALL_TARGET}"
|
||||
SOURCE_PATH ${_in_SOURCE_PATH} PROJECT_SUBPATH ${_in_PROJECT_SUBPATH} PROJECT_NAME ${_in_PROJECT_NAME}
|
||||
PRERUN_SHELL ${_in_PRERUN_SHELL} PRERUN_SHELL_DEBUG ${_in_PRERUN_SHELL_DEBUG} PRERUN_SHELL_RELEASE ${_in_PRERUN_SHELL_RELEASE}
|
||||
OPTIONS ${_in_OPTIONS} OPTIONS_RELEASE ${_in_OPTIONS_RELEASE} OPTIONS_DEBUG ${_in_OPTIONS_DEBUG}
|
||||
|
Loading…
x
Reference in New Issue
Block a user