Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add dedicated cmake boolean option for server landingpage webapp
  • Loading branch information
pathmapper committed Jan 6, 2022
1 parent 0d9f82b commit 3eb8884
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 6 deletions.
1 change: 1 addition & 0 deletions .docker/docker-qgis-build.sh
Expand Up @@ -80,6 +80,7 @@ cmake \
-DWITH_ASTYLE=OFF \
-DWITH_BINDINGS=${WITH_QT5} \
-DWITH_SERVER=${WITH_QT5} \
-DWITH_SERVER_LANDINGPAGE_WEBAPP=${WITH_QT5} \
-DWITH_ORACLE=${WITH_QT5} \
-DWITH_PDAL=${WITH_QT5} \
-DWITH_QT5SERIALPORT=${WITH_QT5} \
Expand Down
2 changes: 1 addition & 1 deletion .docker/qgis3-qt5-build-deps.dockerfile
Expand Up @@ -102,7 +102,7 @@ RUN apt-get update \
hdbcli \
&& apt-get clean

# Node.js and Yarn for server landingpage
# Node.js and Yarn for server landingpage webapp
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
RUN apt-get install -y nodejs
RUN corepack enable
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mingw64.yml
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Install build dependencies
run: ./ms-windows/mingw/mingwdeps.sh

# Node.js and Yarn for server landingpage
# Node.js and Yarn for server landingpage webapp
- uses: actions/setup-node@v2
with:
node-version: '17'
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Expand Up @@ -197,6 +197,8 @@ if(WITH_CORE)
# server disabled default because it needs FastCGI (which is optional dependency)
set (WITH_SERVER FALSE CACHE BOOL "Determines whether QGIS server should be built")
if(WITH_SERVER)
set (WITH_SERVER_LANDINGPAGE_WEBAPP FALSE CACHE BOOL "Determines whether QGIS server landingpage webapp should be built (building webapp disabled by default because it needs nodejs and yarn (which are optional dependencies)")

set (SERVER_SKIP_ECW FALSE CACHE BOOL "Determines whether QGIS server should disable ECW (ECW in server apps requires a special license)")

set (WITH_SERVER_PLUGINS ${WITH_BINDINGS} CACHE BOOL "Determines whether QGIS server support for python plugins should be built")
Expand Down
10 changes: 8 additions & 2 deletions INSTALL.md
Expand Up @@ -192,7 +192,7 @@ See [debian-ubuntu](https://qgis.org/en/site/forusers/alldownloads.html#debian-u
currently supported distributions (plain xenial's GDAL for instance is too old
and we build with GDAL2 from ubuntugis).

To build QGIS server additional dependencies are required for building the server landingpage:
To build QGIS server landingpage webapp additional dependencies are required:

Node.js (current LTS recommended): https://nodejs.org/en/download/<br>
Yarn Package Manager: https://yarnpkg.com/getting-started/install
Expand Down Expand Up @@ -438,7 +438,13 @@ new subdirectory called `build` or `build-qt5` in it.
To build QGIS server additional dependencies are required:

```bash
dnf install fcgi-devel nodejs yarnpkg
dnf install fcgi-devel
```

And for building QGIS server landingpage webapp:

```bash
dnf install nodejs yarnpkg
```

Make sure that your build directory is completely empty when you enter the
Expand Down
1 change: 1 addition & 0 deletions ms-windows/mingw/build.sh
Expand Up @@ -95,6 +95,7 @@ mkdir -p "$BUILDDIR"
-DBINDINGS_GLOBAL_INSTALL=ON \
-DSIP_GLOBAL_INSTALL=ON \
-DWITH_SERVER=ON \
-DWITH_SERVER_LANDINGPAGE_WEBAPP=ON \
-DTXT2TAGS_EXECUTABLE= \
..
)
Expand Down
5 changes: 3 additions & 2 deletions resources/CMakeLists.txt
Expand Up @@ -32,8 +32,10 @@ endif()
if (WITH_SERVER)
file(GLOB_RECURSE SERVER_RESOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} server/*)
set(RESOURCES_FILES ${RESOURCES_FILES} ${SERVER_RESOURCE_FILES})
endif()

# Landingpage
# Server landingpage webapp
if (WITH_SERVER_LANDINGPAGE_WEBAPP)
file(GLOB_RECURSE LANDINGPAGE_SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} server/src/landingpage/*)
set(LANDINGPAGE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/output/data/resources/server/src/landingpage)

Expand All @@ -49,7 +51,6 @@ if (WITH_SERVER)
COMMAND ${CMAKE_COMMAND} -E touch ${LANDINGPAGE_OUTPUT_PATH}/landingpage.stamp
COMMAND cd ${LANDINGPAGE_OUTPUT_PATH} && yarn install --frozen-lockfile && yarn build
)

endif()

# Apple specific handling
Expand Down

0 comments on commit 3eb8884

Please sign in to comment.