2016-03-10 12:22:44 +01:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
project(hyperion-remote)
|
|
|
|
|
2016-06-17 01:25:40 +02:00
|
|
|
find_package(Qt5 COMPONENTS Core Gui Widgets Network REQUIRED)
|
2016-03-09 07:03:17 +01:00
|
|
|
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
|
|
|
# set(CMAKE_CXX_FLAGS "-fPIC")
|
2016-03-10 12:22:44 +01: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
|
2016-08-08 00:17:00 +02:00
|
|
|
# Therefore, an extra path is needed on which to find the required libraries
|
|
|
|
IF ( EXISTS ${CMAKE_FIND_ROOT_PATH}/lib/arm-linux-gnueabihf )
|
|
|
|
LINK_DIRECTORIES(${LINK_DIRECTORIES} ${CMAKE_FIND_ROOT_PATH}/lib/arm-linux-gnueabihf)
|
|
|
|
ENDIF()
|
2016-03-10 12:22:44 +01:00
|
|
|
|
|
|
|
include_directories(${QT_INCLUDES})
|
|
|
|
|
|
|
|
set(hyperion-remote_HEADERS
|
|
|
|
CustomParameter.h
|
|
|
|
JsonConnection.h
|
|
|
|
ColorTransformValues.h)
|
|
|
|
|
|
|
|
set(hyperion-remote_SOURCES
|
|
|
|
hyperion-remote.cpp
|
|
|
|
JsonConnection.cpp)
|
|
|
|
|
2016-03-09 07:03:17 +01:00
|
|
|
add_executable(${PROJECT_NAME}
|
2016-03-10 12:22:44 +01:00
|
|
|
${hyperion-remote_HEADERS}
|
|
|
|
${hyperion-remote_SOURCES})
|
|
|
|
|
2016-03-09 07:03:17 +01:00
|
|
|
target_link_libraries(${PROJECT_NAME}
|
|
|
|
jsoncpp
|
|
|
|
getoptPlusPlus
|
|
|
|
${QT_LIBRARIES})
|
|
|
|
|
2016-06-21 23:34:57 +02:00
|
|
|
qt5_use_modules(${PROJECT_NAME} Gui Core Network)
|
2016-03-10 12:22:44 +01:00
|
|
|
|
2016-05-24 19:56:43 +02:00
|
|
|
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight )
|
2016-03-13 08:04:49 +01:00
|
|
|
|