2013-08-17 15:39:29 +02:00
|
|
|
|
|
|
|
# Define the current source locations
|
2013-08-17 19:20:19 +02:00
|
|
|
set(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/jsonserver)
|
|
|
|
set(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/jsonserver)
|
2013-08-17 15:39:29 +02:00
|
|
|
|
|
|
|
# Group the headers that go through the MOC compiler
|
2013-08-17 19:20:19 +02:00
|
|
|
set(JsonServer_QT_HEADERS
|
2013-08-17 15:39:29 +02:00
|
|
|
${CURRENT_HEADER_DIR}/JsonServer.h
|
|
|
|
${CURRENT_SOURCE_DIR}/JsonClientConnection.h
|
|
|
|
)
|
|
|
|
|
2013-08-17 19:20:19 +02:00
|
|
|
set(JsonServer_HEADERS
|
2013-08-17 15:39:29 +02:00
|
|
|
)
|
|
|
|
|
2013-08-17 19:20:19 +02:00
|
|
|
set(JsonServer_SOURCES
|
2013-08-17 15:39:29 +02:00
|
|
|
${CURRENT_SOURCE_DIR}/JsonServer.cpp
|
|
|
|
${CURRENT_SOURCE_DIR}/JsonClientConnection.cpp
|
|
|
|
)
|
|
|
|
|
2013-08-17 19:20:19 +02:00
|
|
|
set(JsonServer_RESOURCES
|
2013-08-22 20:31:57 +02:00
|
|
|
${CURRENT_SOURCE_DIR}/JsonSchemas.qrc
|
2013-08-17 19:20:19 +02:00
|
|
|
)
|
2016-01-06 17:31:23 +01:00
|
|
|
if(ENABLE_QT5)
|
|
|
|
qt5_wrap_cpp(JsonServer_HEADERS_MOC ${JsonServer_QT_HEADERS})
|
|
|
|
qt5_add_resources(JsonServer_RESOURCES_RCC ${JsonServer_RESOURCES} OPTIONS "-no-compress")
|
|
|
|
else(ENABLE_QT5)
|
2013-08-17 15:39:29 +02:00
|
|
|
qt4_wrap_cpp(JsonServer_HEADERS_MOC ${JsonServer_QT_HEADERS})
|
2013-08-17 19:20:19 +02:00
|
|
|
qt4_add_resources(JsonServer_RESOURCES_RCC ${JsonServer_RESOURCES} OPTIONS "-no-compress")
|
2016-01-06 17:31:23 +01:00
|
|
|
endif(ENABLE_QT5)
|
2013-08-17 19:20:19 +02:00
|
|
|
|
2013-08-17 15:39:29 +02:00
|
|
|
add_library(jsonserver
|
|
|
|
${JsonServer_HEADERS}
|
|
|
|
${JsonServer_QT_HEADERS}
|
|
|
|
${JsonServer_SOURCES}
|
2013-08-17 19:20:19 +02:00
|
|
|
${JsonServer_RESOURCES}
|
|
|
|
${JsonServer_HEADERS_MOC}
|
|
|
|
${JsonServer_RESOURCES_RCC}
|
2013-08-17 15:39:29 +02:00
|
|
|
)
|
|
|
|
|
2016-01-06 17:31:23 +01:00
|
|
|
if(ENABLE_QT5)
|
|
|
|
qt5_use_modules(jsonserver Widgets Network)
|
|
|
|
endif(ENABLE_QT5)
|
|
|
|
|
2013-08-17 15:39:29 +02:00
|
|
|
target_link_libraries(jsonserver
|
|
|
|
hyperion
|
2013-08-17 19:20:19 +02:00
|
|
|
hyperion-utils
|
2014-02-07 09:20:00 +01:00
|
|
|
jsoncpp
|
|
|
|
${QT_LIBRARIES})
|