From c661abeada2381186786089d68b00009fe5fa05d Mon Sep 17 00:00:00 2001 From: Daniel Brunner <0xFEEDC0DE64@gmail.com> Date: Sun, 14 Oct 2018 14:28:07 +0200 Subject: [PATCH] DISTFILES are now being copied over to build folder --- plugins/CMakeLists.txt | 2 +- webserver/CMakeLists.txt | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 185bd1e..43b0e43 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -1,4 +1,4 @@ -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/plugins/webserver) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/plugins/webserver) add_subdirectory(fileserverplugin) add_subdirectory(helloworldplugin) diff --git a/webserver/CMakeLists.txt b/webserver/CMakeLists.txt index a6e25ff..55d4794 100644 --- a/webserver/CMakeLists.txt +++ b/webserver/CMakeLists.txt @@ -5,6 +5,16 @@ set(SOURCES main.cpp ) -add_executable(webserver ${HEADERS} ${SOURCES}) +set(DISTFILES + webserver.json +) + +add_executable(webserver ${HEADERS} ${SOURCES} ${DISTFILES}) target_link_libraries(webserver Qt5::Core dbcorelib webserverlib) + +list(TRANSFORM DISTFILES + PREPEND ${CMAKE_CURRENT_SOURCE_DIR}/) + +file(COPY ${DISTFILES} + DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})