summaryrefslogtreecommitdiffstats
path: root/htdocs/CMakeLists.txt
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2017-05-18 00:28:50 +0200
committerFulup Ar Foll <fulup@iot.bzh>2017-05-18 00:28:50 +0200
commitbc355d67c305ebf6ae1ae1d596e03374b3fb3d2c (patch)
tree3675ee08b43404bb7f21547b14f7fe168429ac85 /htdocs/CMakeLists.txt
parentcb16355e624cb38fd8d721b9417c7921ab0c7cbf (diff)
Started to implemented "make rpm" (work in progress)
Diffstat (limited to 'htdocs/CMakeLists.txt')
-rw-r--r--htdocs/CMakeLists.txt19
1 files changed, 18 insertions, 1 deletions
diff --git a/htdocs/CMakeLists.txt b/htdocs/CMakeLists.txt
index 1266d70..751ff40 100644
--- a/htdocs/CMakeLists.txt
+++ b/htdocs/CMakeLists.txt
@@ -21,4 +21,21 @@
##################################################
# HTML Testing Files
##################################################
-install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR} DESTINATION . FILES_MATCHING PATTERN "*.html" PATTERN "*.js" PATTERN "*.jpg")
+PROJECT_TARGET_ADD(html-simple-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}
+ )
+
+ add_custom_target(${TARGET_NAME} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR})
+
+ SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
+ LABELS "HTDOCS"
+ OUTPUT_NAME htdocs
+ )
+
+ # use only under native Linux when using "make install"
+ install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR} DESTINATION . FILES_MATCHING PATTERN "*.html" PATTERN "*.js" PATTERN "*.jpg")
+