diff --git a/.devcontainer b/.devcontainer index 65ad285..754ff59 160000 --- a/.devcontainer +++ b/.devcontainer @@ -1 +1 @@ -Subproject commit 65ad2858f2525afcc228039bf52acf919139806a +Subproject commit 754ff597cf9406625456b96d4f5b158aae39900e diff --git a/.github/workflows/xpbuild.yml b/.github/workflows/xpbuild.yml index fb55758..8d2fdec 100644 --- a/.github/workflows/xpbuild.yml +++ b/.github/workflows/xpbuild.yml @@ -1,4 +1,7 @@ name: Build +permissions: + contents: read + pull-requests: write on: push: branches: [ "dev" ] @@ -7,24 +10,21 @@ on: workflow_dispatch: jobs: linux: - uses: externpro/externpro/.github/workflows/build-linux.yml@25.05.1 + permissions: + contents: read + pull-requests: write + packages: write + uses: externpro/externpro/.github/workflows/build-linux.yml@25.07.3 with: cmake-workflow-preset: LinuxRelease - runon: ubuntu-latest - secrets: inherit - linux-arm64: - uses: externpro/externpro/.github/workflows/build-linux.yml@25.05.1 - with: - cmake-workflow-preset: LinuxRelease - runon: ubuntu-24.04-arm secrets: inherit macos: - uses: externpro/externpro/.github/workflows/build-macos.yml@25.05.1 + uses: externpro/externpro/.github/workflows/build-macos.yml@25.07.3 with: cmake-workflow-preset: DarwinRelease secrets: inherit windows: - uses: externpro/externpro/.github/workflows/build-windows.yml@25.05.1 + uses: externpro/externpro/.github/workflows/build-windows.yml@25.07.3 with: cmake-workflow-preset: WindowsRelease secrets: inherit diff --git a/.github/workflows/xprelease.yml b/.github/workflows/xprelease.yml index f868a82..86b6f88 100644 --- a/.github/workflows/xprelease.yml +++ b/.github/workflows/xprelease.yml @@ -9,10 +9,9 @@ on: jobs: # Upload build artifacts as release assets release-from-build: - uses: externpro/externpro/.github/workflows/release-from-build.yml@25.05.1 + uses: externpro/externpro/.github/workflows/release-from-build.yml@25.07.3 with: workflow_run_url: ${{ github.event.inputs.workflow_run_url }} - artifact_pattern: "*.tar.xz" permissions: contents: write id-token: write diff --git a/CMakeLists.txt b/CMakeLists.txt index 497fa8b..72c5bdc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 3.31) set(CMAKE_PROJECT_TOP_LEVEL_INCLUDES .devcontainer/cmake/xproinc.cmake) project(spatialite-tools VERSION 5.1.0) set(xVer a) # letter after CMAKE_PROJECT_VERSION, for example 5.1.0a -include(xpflags) -include(GNUInstallDirs) option(BUILD_AUTOMAKE "build with automake" OFF) if(BUILD_AUTOMAKE) include(ExternalProject) @@ -18,12 +16,17 @@ if(BUILD_AUTOMAKE) else() set(targetsFile ${CMAKE_PROJECT_NAME}-targets) if(DEFINED XP_NAMESPACE) + xpExternPackage(TARGETS_FILE ${targetsFile} + BASE ${CMAKE_PROJECT_VERSION}${xVer} XPDIFF "auto" PVT_DEPS libspatialite + WEB "https://www.gaia-gis.it/fossil/spatialite-tools/index" + DESC "collection of open source Command Line Interface (CLI) tools supporting SpatiaLite" + LICENSE "[GPL-3.0](https://www.gaia-gis.it/fossil/spatialite-tools/index 'GPL-3.0-or-later')" + ) set(nameSpace NAMESPACE ${XP_NAMESPACE}::) + set(CMAKE_INSTALL_CMAKEDIR ${XP_INSTALL_CMAKEDIR}) + elseif(NOT DEFINED CMAKE_INSTALL_CMAKEDIR) + set(CMAKE_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) endif() - if(NOT DEFINED XP_INSTALL_CMAKEDIR) - set(XP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) - endif() - xpPackageDevel(TARGETS_FILE ${targetsFile}) xpFindPkg(PKGS libiconv libspatialite) include(cmake/configure.cmake) set(spatialite_srcs shell.c) @@ -68,5 +71,5 @@ else() target_compile_definitions(${exe} PRIVATE SQLITE_OMIT_TRACE) # TODO install(TARGETS ${exe} EXPORT ${targetsFile} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} CONFIGURATIONS Release) endforeach() - install(EXPORT ${targetsFile} DESTINATION ${XP_INSTALL_CMAKEDIR} ${nameSpace}) + install(EXPORT ${targetsFile} DESTINATION ${CMAKE_INSTALL_CMAKEDIR} ${nameSpace}) endif() diff --git a/CMakePresetsBase.json b/CMakePresetsBase.json index 565061f..4489d79 100644 --- a/CMakePresetsBase.json +++ b/CMakePresetsBase.json @@ -9,5 +9,11 @@ "XP_NAMESPACE": "xpro" } } + ], + "buildPresets": [ + { + "name": "build-base", + "hidden": true + } ] }