DISTFILES are now being copied over to build folder

This commit is contained in:
Daniel Brunner
2018-10-14 14:28:07 +02:00
parent 3aa4e62896
commit c661abeada
2 changed files with 12 additions and 2 deletions

View File

@@ -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)

View File

@@ -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})