diff options
author | fulup <fulup.arfoll@iot.bzh> | 2017-06-27 14:24:38 +0200 |
---|---|---|
committer | fulup <fulup.arfoll@iot.bzh> | 2017-06-27 14:25:53 +0200 |
commit | 6c0d556e956eaf1f4eea734d7313d258dd75b878 (patch) | |
tree | 3308e313b6520ea4469ecce5fdc1dbd6850e1882 /htdocs/CMakeLists.txt | |
parent | 0fe1ff36dcc75149481d8071a1806c5408f70acc (diff) |
Work in Progress
Diffstat (limited to 'htdocs/CMakeLists.txt')
-rw-r--r-- | htdocs/CMakeLists.txt | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/htdocs/CMakeLists.txt b/htdocs/CMakeLists.txt index 751ff40..0026b8c 100644 --- a/htdocs/CMakeLists.txt +++ b/htdocs/CMakeLists.txt @@ -21,19 +21,25 @@ ################################################## # HTML Testing Files ################################################## -PROJECT_TARGET_ADD(html-simple-test) +PROJECT_TARGET_ADD(www_test) - add_custom_command(OUTPUT htdocs - DEPENDS ${TARGET_NAME} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND cp "*.html" PATTERN "*.js" PATTERN "*.jpg" ${CMAKE_CURRENT_BINARY_DIR} - ) + file(GLOB SOURCE_FILES "*.html" "*.js" "*.jpg") + + add_custom_target(${TARGET_NAME} + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME} + ) - add_custom_target(${TARGET_NAME} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}) + add_custom_command( + DEPENDS ${SOURCE_FILES} + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME} + COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME} + COMMAND touch ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME} + COMMAND cp -r ${SOURCE_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME} + ) SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES LABELS "HTDOCS" - OUTPUT_NAME htdocs + OUTPUT_NAME ${TARGET_NAME} ) # use only under native Linux when using "make install" |