Skip to content
Permalink
Browse files
Copy first and build in build directory
  • Loading branch information
pathmapper committed Dec 30, 2021
1 parent 00f727b commit b4391e0a69e4be6d78436886814f6ea2028d0ef0
Showing with 8 additions and 9 deletions.
  1. +0 −1 .gitignore
  2. +7 −7 resources/CMakeLists.txt
  3. +1 −1 resources/server/src/landingpage/README.md
@@ -57,7 +57,6 @@ 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
@@ -35,19 +35,19 @@ if (WITH_SERVER)

# Landingpage
file(GLOB_RECURSE LANDINGPAGE_SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} server/src/landingpage/*)
list(REMOVE_ITEM $(LANDINGPAGE_SOURCE_FILES) "*landingpage.stamp")
set(LANDINGPAGE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/../output/data/resources/server/src/landingpage)

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

add_custom_command(
POST_BUILD
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/server/src/landingpage/landingpage.stamp
OUTPUT ${LANDINGPAGE_OUTPUT_PATH}/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/
${CMAKE_CURRENT_SOURCE_DIR}/server/src/landingpage/
${LANDINGPAGE_OUTPUT_PATH}/
COMMAND ${CMAKE_COMMAND} -E touch ${LANDINGPAGE_OUTPUT_PATH}/landingpage.stamp
COMMAND cd ${LANDINGPAGE_OUTPUT_PATH} && yarn install --frozen-lockfile && yarn build
)

endif()
@@ -17,7 +17,7 @@ yarn serve
yarn build
```

Built files location: `resources/server/api/ogc/static/landingpage`
Built files location: `../../api/ogc/static/landingpage/`

### Lints and fixes files
```

0 comments on commit b4391e0

Please sign in to comment.