2016-06-12 22:27:24 +02:00
|
|
|
|
|
|
|
# Define the current source locations
|
2018-12-27 23:11:32 +01:00
|
|
|
set(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/webserver)
|
|
|
|
set(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/webserver)
|
2016-06-12 22:27:24 +02:00
|
|
|
|
2017-08-04 23:08:15 +02:00
|
|
|
FILE ( GLOB WebConfig_SOURCES "${CURRENT_HEADER_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.cpp" )
|
2016-09-14 13:51:28 +02:00
|
|
|
FILE ( GLOB_RECURSE webFiles RELATIVE ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/assets/webconfig/* )
|
2017-08-04 23:08:15 +02:00
|
|
|
|
2016-09-14 13:51:28 +02:00
|
|
|
FOREACH( f ${webFiles} )
|
|
|
|
STRING ( REPLACE "../assets/webconfig/" "" fname ${f})
|
|
|
|
SET(HYPERION_WEBCONFIG_RES "${HYPERION_WEBCONFIG_RES}\n\t\t<file alias=\"/webconfig/${fname}\">${f}</file>")
|
|
|
|
ENDFOREACH()
|
|
|
|
CONFIGURE_FILE(${CURRENT_SOURCE_DIR}/WebConfig.qrc.in ${CMAKE_BINARY_DIR}/WebConfig.qrc )
|
|
|
|
SET(WebConfig_RESOURCES ${CMAKE_BINARY_DIR}/WebConfig.qrc)
|
2016-06-12 22:27:24 +02:00
|
|
|
|
2018-12-27 23:11:32 +01:00
|
|
|
add_library(webserver
|
2016-06-12 22:27:24 +02:00
|
|
|
${WebConfig_SOURCES}
|
2017-10-13 00:06:31 +02:00
|
|
|
${WebConfig_RESOURCES}
|
2016-06-12 22:27:24 +02:00
|
|
|
)
|
|
|
|
|
2018-12-27 23:11:32 +01:00
|
|
|
target_link_libraries(webserver
|
2016-06-12 22:27:24 +02:00
|
|
|
hyperion
|
|
|
|
hyperion-utils
|
2018-12-27 23:11:32 +01:00
|
|
|
hyperion-api
|
2017-08-01 15:42:36 +02:00
|
|
|
Qt5::Network
|
2016-06-12 22:27:24 +02:00
|
|
|
)
|