Skip to content
Permalink
Browse files
Integrate landingpage build process with cmake
  • Loading branch information
pathmapper committed Dec 30, 2021
1 parent 8b1d08d commit 00f727bd1c809fe3933203e8af7890d9a44ca425
@@ -56,6 +56,9 @@ qgis.kdev4
qgis.supp
qgis-test.ctest
qtcreator-build/
resources/server/api/ogc/static/landingpage
resources/server/src/landingpage/landingpage.stamp
resources/server/src/landingpage/node_modules
resources/themes/*/style.qss.auto
scripts/astyle.exe
scripts/Debug
@@ -32,6 +32,24 @@ endif()
if (WITH_SERVER)
file(GLOB_RECURSE SERVER_RESOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} server/*)
set(RESOURCES_FILES ${RESOURCES_FILES} ${SERVER_RESOURCE_FILES})

# Landingpage
file(GLOB_RECURSE LANDINGPAGE_SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} server/src/landingpage/*)
list(REMOVE_ITEM $(LANDINGPAGE_SOURCE_FILES) "*landingpage.stamp")

add_custom_target (yarn-target ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/server/src/landingpage/landingpage.stamp)

add_custom_command(
POST_BUILD
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/server/src/landingpage/landingpage.stamp
DEPENDS ${LANDINGPAGE_SOURCE_FILES}
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_SOURCE_DIR}/server/src/landingpage/landingpage.stamp
COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR}/server/src/landingpage && yarn install --frozen-lockfile && yarn build
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/server/api/ogc/static/landingpage/
${CMAKE_CURRENT_BINARY_DIR}/../output/data/resources/server/api/ogc/static/landingpage/
)

endif()

# Apple specific handling

This file was deleted.

This file was deleted.

Binary file not shown.
@@ -17,7 +17,7 @@ yarn serve
yarn build
```

Built files needs to be moved from `dist` to `resources/server/api/ogc/static/landingpage`.
Built files location: `resources/server/api/ogc/static/landingpage`

### Lints and fixes files
```
@@ -1,5 +1,6 @@
module.exports = {
publicPath: './',
outputDir: '../../api/ogc/static/landingpage/',
assetsDir: './',
configureWebpack: {
devtool: "source-map",

0 comments on commit 00f727b

Please sign in to comment.