2013-08-11 11:54:16 +02:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
2013-08-13 19:45:17 +02:00
|
|
|
|
2013-08-11 11:54:16 +02:00
|
|
|
project(hyperion-remote)
|
|
|
|
|
2013-11-22 14:42:02 +01:00
|
|
|
# find Qt4
|
2016-01-06 17:31:23 +01:00
|
|
|
if(ENABLE_QT5)
|
|
|
|
find_package(Qt5 COMPONENTS Core Gui Widgets Network REQUIRED)
|
|
|
|
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
|
|
|
# set(CMAKE_CXX_FLAGS "-fPIC")
|
|
|
|
else(ENABLE_QT5)
|
2013-08-11 21:49:11 +02:00
|
|
|
find_package(Qt4 REQUIRED QtCore QtGui QtNetwork)
|
2016-01-06 17:31:23 +01:00
|
|
|
endif(ENABLE_QT5)
|
2013-08-11 11:54:16 +02:00
|
|
|
|
|
|
|
# The following I do not undrstand completely...
|
|
|
|
# libQtCore.so uses some hardcoded library path inside which are incorrect after copying the file RPi file system
|
|
|
|
# Therefor, an extra path is needed on which to find the required libraries
|
|
|
|
LINK_DIRECTORIES(${LINK_DIRECTORIES} ${CMAKE_FIND_ROOT_PATH}/lib/arm-linux-gnueabihf)
|
|
|
|
|
2013-08-11 21:49:11 +02:00
|
|
|
include_directories(${QT_INCLUDES})
|
2013-08-11 11:54:16 +02:00
|
|
|
|
2013-08-11 21:49:11 +02:00
|
|
|
set(hyperion-remote_HEADERS
|
2013-08-13 20:10:19 +02:00
|
|
|
CustomParameter.h
|
2013-08-17 11:54:16 +02:00
|
|
|
JsonConnection.h
|
2013-08-13 20:10:19 +02:00
|
|
|
ColorTransformValues.h)
|
2013-08-11 11:54:16 +02:00
|
|
|
|
|
|
|
set(hyperion-remote_SOURCES
|
2013-08-13 20:10:19 +02:00
|
|
|
hyperion-remote.cpp
|
2013-08-17 11:54:16 +02:00
|
|
|
JsonConnection.cpp)
|
2013-08-11 11:54:16 +02:00
|
|
|
|
|
|
|
add_executable(hyperion-remote
|
2013-08-13 20:10:19 +02:00
|
|
|
${hyperion-remote_HEADERS}
|
|
|
|
${hyperion-remote_SOURCES})
|
2013-08-11 11:54:16 +02:00
|
|
|
|
2016-01-06 17:31:23 +01:00
|
|
|
if(ENABLE_QT5)
|
|
|
|
qt5_use_modules(hyperion-remote Widgets Network)
|
|
|
|
endif(ENABLE_QT5)
|
|
|
|
|
2013-08-11 11:54:16 +02:00
|
|
|
target_link_libraries(hyperion-remote
|
2013-08-21 21:50:17 +02:00
|
|
|
jsoncpp
|
2014-02-07 09:20:00 +01:00
|
|
|
getoptPlusPlus
|
|
|
|
${QT_LIBRARIES})
|