Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/build.yml → .github/workflows/xpbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,24 @@ on:
workflow_dispatch:
jobs:
linux:
uses: externpro/externpro/.github/workflows/build-linux.yml@25.04
uses: externpro/externpro/.github/workflows/build-linux.yml@25.05.1
with:
cmake-workflow-preset: LinuxRelease
runon: ubuntu-latest
secrets: inherit
linux-arm64:
uses: externpro/externpro/.github/workflows/build-linux.yml@25.04
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
with:
cmake-workflow-preset: DarwinRelease
secrets: inherit
windows:
uses: externpro/externpro/.github/workflows/build-windows.yml@25.04
uses: externpro/externpro/.github/workflows/build-windows.yml@25.05.1
with:
cmake-workflow-preset: WindowsRelease
secrets: inherit
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ on:
jobs:
# Upload build artifacts as release assets
release-from-build:
uses: externpro/externpro/.github/workflows/release-from-build.yml@25.04
uses: externpro/externpro/.github/workflows/release-from-build.yml@25.05.1
with:
workflow_run_url: ${{ github.event.inputs.workflow_run_url }}
artifact_pattern: "*.tar.xz"
permissions:
contents: write
id-token: write
attestations: write
secrets: inherit
34 changes: 17 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
cmake_minimum_required(VERSION 3.31)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/.devcontainer/cmake ${CMAKE_CURRENT_LIST_DIR}/cmake)
include(preproject)
project(spatialite-tools VERSION 5.1.0.4)
set(xVer) # letter after CMAKE_PROJECT_VERSION, for example 5.1.0a
include(flags)
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)
if(TRUE)
option(BUILD_AUTOMAKE "build with automake" OFF)
if(BUILD_AUTOMAKE)
include(ExternalProject)
set_property(DIRECTORY PROPERTY "EP_BASE" ${CMAKE_BINARY_DIR}/epbase)
ExternalProject_Add(${PROJECT_NAME}
DOWNLOAD_COMMAND sudo dnf -y install --setopt=tsflags=nodocs epel-release && sudo dnf -y install sqlite-devel libxml2-devel
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} BINARY_DIR ${CMAKE_CURRENT_LIST_DIR}
CONFIGURE_COMMAND export LIBXML2_CFLAGS=-I/usr/include/libxml2 && export LIBXML2_LIBS=-lxml2 &&
PKG_CONFIG_PATH=/bpvol/workspace/libspatialite/_bld/epbase/Install/libspatialite/lib/pkgconfig/ &&
<SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --disable-readosm
)
else()
set(targetsFile ${CMAKE_PROJECT_NAME}-targets)
if(DEFINED XP_NAMESPACE)
set(nameSpace NAMESPACE ${XP_NAMESPACE}::)
Expand All @@ -15,7 +25,7 @@ if(TRUE)
endif()
xpPackageDevel(TARGETS_FILE ${targetsFile})
xpFindPkg(PKGS libiconv libspatialite)
include(configure)
include(cmake/configure.cmake)
set(spatialite_srcs shell.c)
set(spatialite_deps xpro::libiconv)
set(exes
Expand Down Expand Up @@ -59,14 +69,4 @@ if(TRUE)
install(TARGETS ${exe} EXPORT ${targetsFile} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} CONFIGURATIONS Release)
endforeach()
install(EXPORT ${targetsFile} DESTINATION ${XP_INSTALL_CMAKEDIR} ${nameSpace})
else()
include(ExternalProject)
set_property(DIRECTORY PROPERTY "EP_BASE" ${CMAKE_BINARY_DIR}/epbase)
ExternalProject_Add(${PROJECT_NAME}
DOWNLOAD_COMMAND sudo dnf -y install --setopt=tsflags=nodocs epel-release && sudo dnf -y install sqlite-devel libxml2-devel
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} BINARY_DIR ${CMAKE_CURRENT_LIST_DIR}
CONFIGURE_COMMAND export LIBXML2_CFLAGS=-I/usr/include/libxml2 && export LIBXML2_LIBS=-lxml2 &&
PKG_CONFIG_PATH=/bpvol/workspace/libspatialite/_bld/epbase/Install/libspatialite/lib/pkgconfig/ &&
<SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --disable-readosm
)
endif()
1 change: 1 addition & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"version": 8,
"include": [
".devcontainer/cmake/presets/xpLinuxNinja.json",
".devcontainer/cmake/presets/xpDarwinNinja.json",
".devcontainer/cmake/presets/xpWindowsVs2022.json"
]
}
232 changes: 0 additions & 232 deletions cmake/config.h.cmake.in

This file was deleted.

28 changes: 14 additions & 14 deletions cmake/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,33 +62,33 @@ xpcfgLstatFollowsSlashedSymlink(LSTAT_FOLLOWS_SLASHED_SYMLINK)
set(ENABLE_LIBXML2 FALSE) # TODO find package
set(OMIT_READOSM TRUE) # --enable-readosm : enables ReadOSM inclusion
set(SPATIALITE_AMALGAMATION FALSE) # TODO determine?
xpcfgSetDefineList(ENABLE_LIBXML2 OMIT_READOSM SPATIALITE_AMALGAMATION)
xpcfgStdcHeaders(STDC_HEADERS)
xpcfgTmInHdr(sys/time.h TM_IN_SYS_TIME)
# cmakedefine entries in config.h.cmake.in
xpcfgLtObjdir(LT_OBJDIR)
set(PACKAGE ${CMAKE_PROJECT_NAME})
set(PACKAGE_BUGREPORT a.furieri@lqt.it)
set(PACKAGE_NAME ${CMAKE_PROJECT_NAME})
set(PACKAGE_STRING "${CMAKE_PROJECT_NAME} ${CMAKE_PROJECT_VERSION}${xVer}")
set(PACKAGE_TARNAME ${CMAKE_PROJECT_NAME})
set(PACKAGE_URL https://www.gaia-gis.it/fossil/libspatialite/home)
set(PACKAGE_VERSION ${CMAKE_PROJECT_VERSION}${xVer})
set(VERSION ${CMAKE_PROJECT_VERSION}${xVer})
set(PACKAGE "\"${CMAKE_PROJECT_NAME}\"")
set(PACKAGE_BUGREPORT "\"a.furieri@lqt.it\"")
set(PACKAGE_NAME "\"${CMAKE_PROJECT_NAME}\"")
set(PACKAGE_STRING "\"${CMAKE_PROJECT_NAME} ${CMAKE_PROJECT_VERSION}${xVer}\"")
set(PACKAGE_TARNAME "\"${CMAKE_PROJECT_NAME}\"")
set(PACKAGE_URL "\"https://www.gaia-gis.it/fossil/libspatialite/home\"")
set(PACKAGE_VERSION "\"${CMAKE_PROJECT_VERSION}${xVer}\"")
set(VERSION "\"${CMAKE_PROJECT_VERSION}${xVer}\"")
xpcfgHugeFileSupport()
xpcfgConst()
xpcfgConst(const)
xpcfgCheckTypeSize()
if(NOT HAVE_SIZEOF_OFF_T)
set(off_t "long int") # Define to `long int' if <sys/types.h> does not define. */
else()
set(off_t 0) # cmakedefine
endif()
if(NOT HAVE_SIZEOF_SIZE_T)
set(size_t "unsigned int") # Define to `unsigned int' if <sys/types.h> does not define.
else()
set(size_t 0) # cmakedefine
endif()
xpcfgVolatile(volatile)
cmake_pop_check_state()
if(WIN32)
set(msvc -msvc)
endif()
set(CONFIG_H_COMMENT "{CMAKE_BINARY_DIR}/cmake/config${msvc}.h. Generated from cmake/config.h.cmake.in by cmake/configure.cmake.")
configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h.cmake.in ${CMAKE_BINARY_DIR}/CMakeFiles/config.h.cmake)
configure_file(${CMAKE_BINARY_DIR}/CMakeFiles/config.h.cmake ${CMAKE_BINARY_DIR}/cmake/config${msvc}.h)
xpcfgDotinFile("config.h.in" "cmake/config${msvc}.h")