2014-01-28 09:47:16 +01:00
|
|
|
# Configure minimum CMAKE version
|
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
|
|
|
|
# Set the project name
|
|
|
|
project(hyperion-x11)
|
|
|
|
|
2016-03-09 07:03:17 +01:00
|
|
|
# find QT
|
2016-01-06 17:31:23 +01:00
|
|
|
if(ENABLE_QT5)
|
2016-03-09 07:03:17 +01:00
|
|
|
find_package(Qt5Widgets REQUIRED)
|
2016-01-06 17:31:23 +01:00
|
|
|
else(ENABLE_QT5)
|
2016-03-09 07:03:17 +01:00
|
|
|
find_package(Qt4 REQUIRED QtCore QtGui QtNetwork)
|
2016-01-06 17:31:23 +01:00
|
|
|
endif(ENABLE_QT5)
|
2014-01-28 09:47:16 +01:00
|
|
|
|
2014-01-30 13:35:29 +01:00
|
|
|
# Find X11
|
|
|
|
find_package(X11 REQUIRED)
|
|
|
|
|
2014-01-28 09:47:16 +01:00
|
|
|
include_directories(
|
2014-11-21 21:24:33 +01:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/../../libsrc/protoserver
|
2014-01-28 09:47:16 +01:00
|
|
|
${QT_INCLUDES}
|
2014-01-30 13:35:29 +01:00
|
|
|
${X11_INCLUDES}
|
2014-12-20 13:15:20 +01:00
|
|
|
${PROTOBUF_INCLUDE_DIRS}
|
2014-01-28 09:47:16 +01:00
|
|
|
)
|
|
|
|
|
2014-01-30 13:35:29 +01:00
|
|
|
set(Hyperion_X11_QT_HEADERS
|
|
|
|
X11Wrapper.h)
|
|
|
|
|
2014-01-28 09:47:16 +01:00
|
|
|
set(Hyperion_X11_HEADERS
|
|
|
|
)
|
|
|
|
|
|
|
|
set(Hyperion_X11_SOURCES
|
2014-01-30 13:35:29 +01:00
|
|
|
hyperion-x11.cpp
|
|
|
|
X11Wrapper.cpp
|
2014-01-28 09:47:16 +01:00
|
|
|
)
|
|
|
|
|
2016-01-06 17:31:23 +01:00
|
|
|
if(ENABLE_QT5)
|
2016-03-09 07:03:17 +01:00
|
|
|
QT5_WRAP_CPP(Hyperion_X11_HEADERS_MOC ${Hyperion_X11_QT_HEADERS})
|
2016-01-06 17:31:23 +01:00
|
|
|
else(ENABLE_QT5)
|
2016-03-09 07:03:17 +01:00
|
|
|
QT4_WRAP_CPP(Hyperion_X11_HEADERS_MOC ${Hyperion_X11_QT_HEADERS})
|
2016-01-06 17:31:23 +01:00
|
|
|
endif(ENABLE_QT5)
|
2014-01-30 13:35:29 +01:00
|
|
|
|
2016-03-09 07:03:17 +01:00
|
|
|
|
|
|
|
add_executable(${PROJECT_NAME}
|
2014-01-28 09:47:16 +01:00
|
|
|
${Hyperion_X11_HEADERS}
|
|
|
|
${Hyperion_X11_SOURCES}
|
2014-01-30 13:35:29 +01:00
|
|
|
${Hyperion_X11_HEADERS_MOC}
|
2014-01-28 09:47:16 +01:00
|
|
|
)
|
|
|
|
|
2016-03-09 07:03:17 +01:00
|
|
|
target_link_libraries(${PROJECT_NAME}
|
2014-01-28 09:47:16 +01:00
|
|
|
getoptPlusPlus
|
|
|
|
blackborder
|
|
|
|
hyperion-utils
|
2014-11-21 21:24:33 +01:00
|
|
|
protoserver
|
|
|
|
x11-grabber
|
2014-01-30 13:35:29 +01:00
|
|
|
${X11_LIBRARIES}
|
2014-01-28 09:47:16 +01:00
|
|
|
pthread
|
|
|
|
)
|
|
|
|
|
2016-01-06 17:31:23 +01:00
|
|
|
if(ENABLE_QT5)
|
2016-03-09 07:03:17 +01:00
|
|
|
qt5_use_modules(${PROJECT_NAME} Widgets Core Gui Network)
|
2016-01-06 17:31:23 +01:00
|
|
|
else(ENABLE_QT5)
|
2016-03-09 07:03:17 +01:00
|
|
|
qt4_use_modules(${PROJECT_NAME} Core Gui Network )
|
2016-01-06 17:31:23 +01:00
|
|
|
endif(ENABLE_QT5)
|
2016-03-10 12:22:44 +01:00
|
|
|
|
|
|
|
install ( TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_SOURCE_DIR}/deploy/bin" )
|