Skip to content

Commit 00f727b

Browse files
committedDec 30, 2021
Integrate landingpage build process with cmake
1 parent 8b1d08d commit 00f727b

File tree

8 files changed

+23
-7
lines changed

8 files changed

+23
-7
lines changed
 

‎.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ qgis.kdev4
5656
qgis.supp
5757
qgis-test.ctest
5858
qtcreator-build/
59+
resources/server/api/ogc/static/landingpage
60+
resources/server/src/landingpage/landingpage.stamp
61+
resources/server/src/landingpage/node_modules
5962
resources/themes/*/style.qss.auto
6063
scripts/astyle.exe
6164
scripts/Debug

‎resources/CMakeLists.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,24 @@ endif()
3232
if (WITH_SERVER)
3333
file(GLOB_RECURSE SERVER_RESOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} server/*)
3434
set(RESOURCES_FILES ${RESOURCES_FILES} ${SERVER_RESOURCE_FILES})
35+
36+
# Landingpage
37+
file(GLOB_RECURSE LANDINGPAGE_SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} server/src/landingpage/*)
38+
list(REMOVE_ITEM $(LANDINGPAGE_SOURCE_FILES) "*landingpage.stamp")
39+
40+
add_custom_target (yarn-target ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/server/src/landingpage/landingpage.stamp)
41+
42+
add_custom_command(
43+
POST_BUILD
44+
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/server/src/landingpage/landingpage.stamp
45+
DEPENDS ${LANDINGPAGE_SOURCE_FILES}
46+
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_SOURCE_DIR}/server/src/landingpage/landingpage.stamp
47+
COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR}/server/src/landingpage && yarn install --frozen-lockfile && yarn build
48+
COMMAND ${CMAKE_COMMAND} -E copy_directory
49+
${CMAKE_CURRENT_SOURCE_DIR}/server/api/ogc/static/landingpage/
50+
${CMAKE_CURRENT_BINARY_DIR}/../output/data/resources/server/api/ogc/static/landingpage/
51+
)
52+
3553
endif()
3654

3755
# Apple specific handling

‎resources/server/api/ogc/static/landingpage/css/app.ca3f5643.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎resources/server/api/ogc/static/landingpage/css/chunk-vendors.a728f495.css

Lines changed: 0 additions & 5 deletions
This file was deleted.
Binary file not shown.

‎resources/server/src/landingpage/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ yarn serve
1717
yarn build
1818
```
1919

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

2222
### Lints and fixes files
2323
```

‎resources/server/src/landingpage/vue.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = {
22
publicPath: './',
3+
outputDir: '../../api/ogc/static/landingpage/',
34
assetsDir: './',
45
configureWebpack: {
56
devtool: "source-map",

0 commit comments

Comments
 (0)
Please sign in to comment.