Generate config files and directories with CMake (#316)

* Generate config files and directories with CMake

CMake >= 3.13 required due to 'https://cmake.org/Bug/view.php?id=14444'

* Update CI pipeline
This commit is contained in:
Hummeltech
2023-07-20 14:34:21 -07:00
committed by GitHub
parent fbf4c7eb8b
commit 6e20fba5e9
20 changed files with 201 additions and 91 deletions

View File

@ -13,35 +13,20 @@
include(Dart)
execute_process(COMMAND ${APXS_EXECUTABLE} -q progname
OUTPUT_VARIABLE APXS_PROGNAME
OUTPUT_VARIABLE HTTPD_PROGNAME
OUTPUT_STRIP_TRAILING_WHITESPACE
)
find_package(UnixCommands REQUIRED)
find_program(CAT_EXECUTABLE NAMES cat REQUIRED)
find_program(CURL_EXECUTABLE NAMES curl REQUIRED)
find_program(HTTPD_EXECUTABLE NAMES ${APXS_PROGNAME} REQUIRED)
find_program(HTTPD_EXECUTABLE NAMES ${HTTPD_PROGNAME} REQUIRED)
find_program(ID_EXECUTABLE NAMES id REQUIRED)
find_program(KILL_EXECUTABLE NAMES kill REQUIRED)
find_program(MKDIR_EXECUTABLE NAMES mkdir REQUIRED)
find_program(SHA256SUM_EXECUTABLE NAMES gsha256sum sha256sum REQUIRED)
find_program(TOUCH_EXECUTABLE NAMES gtouch touch REQUIRED)
if(LibMapnik_VERSION STRLESS "4")
find_program(MAPNIK_CONFIG_EXECUTABLE NAMES mapnik-config REQUIRED)
execute_process(COMMAND ${MAPNIK_CONFIG_EXECUTABLE} --fonts
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE MAPNIK_FONTS_DIR
)
execute_process(COMMAND ${MAPNIK_CONFIG_EXECUTABLE} --input-plugins
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE MAPNIK_PLUGINS_DIR
)
elseif(LibMapnik_VERSION STRGREATER_EQUAL "4")
pkg_get_variable(MAPNIK_FONTS_DIR libmapnik fonts_dir)
pkg_get_variable(MAPNIK_PLUGINS_DIR libmapnik plugins_dir)
endif()
execute_process(COMMAND ${ID_EXECUTABLE} -gn nobody
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE NOGROUP_NAME
@ -68,24 +53,6 @@ configure_file(
conf/httpd.conf
)
configure_file(
../utils/example-map/index.html
www/index.html
COPYONLY
)
configure_file(
../utils/example-map/mapnik.xml
www/mapnik.xml
COPYONLY
)
configure_file(
../utils/example-map/very_simplified_land_polygons.gpkg
www/very_simplified_land_polygons.gpkg
COPYONLY
)
#-----------------------------------------------------------------------------
#
# Tests

View File

@ -1,8 +1,8 @@
Alias /renderd-example-map @PROJECT_BINARY_DIR@/tests/www
Alias /renderd-example-map @PROJECT_SOURCE_DIR@/utils/example-map
Redirect /renderd-example-map/leaflet/leaflet.css https://unpkg.com/leaflet/dist/leaflet.css
Redirect /renderd-example-map/leaflet/leaflet.min.js https://unpkg.com/leaflet/dist/leaflet.js
<Directory @PROJECT_BINARY_DIR@/tests/www>
<Directory @PROJECT_SOURCE_DIR@/utils/example-map>
Allow from all
AllowOverride All
DirectoryIndex index.html
@ -70,23 +70,23 @@ ServerRoot @PROJECT_BINARY_DIR@/tests
User nobody
<IfModule !access_compat_module>
LoadModule access_compat_module @HTTPD_MODULES_DIR@/mod_access_compat.so
LoadModule access_compat_module @HTTPD_LIBEXECDIR@/mod_access_compat.so
</IfModule>
<IfModule !alias_module>
LoadModule alias_module @HTTPD_MODULES_DIR@/mod_alias.so
LoadModule alias_module @HTTPD_LIBEXECDIR@/mod_alias.so
</IfModule>
<IfModule !authz_core_module>
LoadModule authz_core_module @HTTPD_MODULES_DIR@/mod_authz_core.so
LoadModule authz_core_module @HTTPD_LIBEXECDIR@/mod_authz_core.so
</IfModule>
<IfModule !dir_module>
LoadModule dir_module @HTTPD_MODULES_DIR@/mod_dir.so
LoadModule dir_module @HTTPD_LIBEXECDIR@/mod_dir.so
</IfModule>
<IfModule !log_config_module>
LoadModule log_config_module @HTTPD_MODULES_DIR@/mod_log_config.so
LoadModule log_config_module @HTTPD_LIBEXECDIR@/mod_log_config.so
</IfModule>
<IfModule !mpm_event_module>
LoadModule mpm_event_module @HTTPD_MODULES_DIR@/mod_mpm_event.so
LoadModule mpm_event_module @HTTPD_LIBEXECDIR@/mod_mpm_event.so
</IfModule>
<IfModule !unixd_module>
LoadModule unixd_module @HTTPD_MODULES_DIR@/mod_unixd.so
LoadModule unixd_module @HTTPD_LIBEXECDIR@/mod_unixd.so
</IfModule>

View File

@ -1,12 +1,12 @@
[mapnik]
font_dir_recurse=true
font_dir=@MAPNIK_FONTS_DIR@
font_dir_recurse=@MAPNIK_FONTS_DIR_RECURSE@
plugins_dir=@MAPNIK_PLUGINS_DIR@
[@MAP_NAME@]
TILEDIR=@PROJECT_BINARY_DIR@/tests/tiles
URI=/tiles/renderd-example
XML=@PROJECT_BINARY_DIR@/tests/www/mapnik.xml
XML=@PROJECT_SOURCE_DIR@/utils/example-map/mapnik.xml
[renderd1]
iphostname=127.0.0.1