add install commands

instead of "make" use "make install/strip" release compile


Former-commit-id: f4dd2d9e1a4d815b667665892a3bd9cec64218a3
This commit is contained in:
redpanther 2016-03-10 12:22:44 +01:00
parent 12b406dd4b
commit e01bcd708d
7 changed files with 62 additions and 44 deletions

View File

@ -60,6 +60,9 @@ if(ENABLE_OSX AND ENABLE_DISPMANX)
endif(ENABLE_OSX AND ENABLE_DISPMANX)
SET ( PROTOBUF_INSTALL_BIN_DIR ${CMAKE_SOURCE_DIR}/deploy )
SET ( PROTOBUF_INSTALL_LIB_DIR ${CMAKE_SOURCE_DIR}/deploy )
#if(ENABLE_QT5)
# TODO vs ENABLE_QT4?
#endif(ENABLE_QT5)

View File

@ -31,13 +31,13 @@ else(ENABLE_QT5)
QT4_WRAP_CPP(Hyperion_AML_HEADERS_MOC ${Hyperion_AML_QT_HEADERS})
endif(ENABLE_QT5)
add_executable(hyperion-amlogic
add_executable(${PROJECT_NAME}
${Hyperion_AML_HEADERS}
${Hyperion_AML_SOURCES}
${Hyperion_AML_HEADERS_MOC}
)
target_link_libraries(hyperion-amlogic
target_link_libraries(${PROJECT_NAME}
getoptPlusPlus
blackborder
hyperion-utils
@ -46,7 +46,10 @@ target_link_libraries(hyperion-amlogic
pthread
)
qt4_use_modules(hyperion-amlogic
qt4_use_modules(${PROJECT_NAME}
Core
Gui
Network)
install ( TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_SOURCE_DIR}/deploy/bin" )

View File

@ -63,3 +63,6 @@ else(ENABLE_QT5)
Network
)
endif(ENABLE_QT5)
install ( TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_SOURCE_DIR}/deploy/bin" )

View File

@ -1,41 +1,43 @@
cmake_minimum_required(VERSION 2.8)
project(hyperion-remote)
# find Qt4
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)
find_package(Qt4 REQUIRED QtCore QtGui QtNetwork)
endif(ENABLE_QT5)
# 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)
include_directories(${QT_INCLUDES})
set(hyperion-remote_HEADERS
CustomParameter.h
JsonConnection.h
ColorTransformValues.h)
set(hyperion-remote_SOURCES
hyperion-remote.cpp
JsonConnection.cpp)
add_executable(hyperion-remote
${hyperion-remote_HEADERS}
${hyperion-remote_SOURCES})
if(ENABLE_QT5)
qt5_use_modules(hyperion-remote Widgets Network)
endif(ENABLE_QT5)
target_link_libraries(hyperion-remote
jsoncpp
getoptPlusPlus
${QT_LIBRARIES})
cmake_minimum_required(VERSION 2.8)
project(hyperion-remote)
# find Qt4
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)
find_package(Qt4 REQUIRED QtCore QtGui QtNetwork)
endif(ENABLE_QT5)
# 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)
include_directories(${QT_INCLUDES})
set(hyperion-remote_HEADERS
CustomParameter.h
JsonConnection.h
ColorTransformValues.h)
set(hyperion-remote_SOURCES
hyperion-remote.cpp
JsonConnection.cpp)
add_executable(hyperion-remote
${hyperion-remote_HEADERS}
${hyperion-remote_SOURCES})
if(ENABLE_QT5)
qt5_use_modules(hyperion-remote Widgets Network)
endif(ENABLE_QT5)
target_link_libraries(hyperion-remote
jsoncpp
getoptPlusPlus
${QT_LIBRARIES})
install ( TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_SOURCE_DIR}/deploy/bin" )

View File

@ -53,3 +53,6 @@ target_link_libraries(hyperion-v4l2
pthread
${QT_LIBRARIES}
)
install ( TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_SOURCE_DIR}/deploy/bin" )

View File

@ -62,3 +62,5 @@ qt4_use_modules(hyperion-x11
Gui
Network)
endif(ENABLE_QT5)
install ( TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_SOURCE_DIR}/deploy/bin" )

View File

@ -33,3 +33,5 @@ endif (ENABLE_AMLOGIC)
if (ENABLE_PROTOBUF)
target_link_libraries(hyperiond protoserver)
endif (ENABLE_PROTOBUF)
install ( TARGETS hyperiond DESTINATION "${CMAKE_SOURCE_DIR}/deploy/bin" )