Skip to content

Commit

Permalink
Integrate landingpage build process with cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
pathmapper committed Dec 30, 2021
1 parent 8b1d08d commit 00f727b
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions resources/CMakeLists.txt
Expand Up @@ -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
Expand Down

This file was deleted.

This file was deleted.

Binary file not shown.
2 changes: 1 addition & 1 deletion resources/server/src/landingpage/README.md
Expand Up @@ -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
```
Expand Down
1 change: 1 addition & 0 deletions resources/server/src/landingpage/vue.config.js
@@ -1,5 +1,6 @@
module.exports = {
publicPath: './',
outputDir: '../../api/ogc/static/landingpage/',
assetsDir: './',
configureWebpack: {
devtool: "source-map",
Expand Down

0 comments on commit 00f727b

Please sign in to comment.