mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Allow disabling PROTOBUF support
One dependency less for users that only use DISPMANX grabbing Former-commit-id: 24ea0480e3798bab692e75d82ddb9f5eccfa03c5
This commit is contained in:
@@ -19,6 +19,13 @@ message(STATUS "ENABLE_V4L2 = " ${ENABLE_V4L2})
|
||||
option(ENABLE_TINKERFORGE "Enable the TINKERFORGE device" ON)
|
||||
message(STATUS "ENABLE_TINKERFORGE = " ${ENABLE_TINKERFORGE})
|
||||
|
||||
option(ENABLE_PROTOBUF "Enable PROTOBUF server" ON)
|
||||
message(STATUS "ENABLE_PROTOBUF = " ${ENABLE_PROTOBUF})
|
||||
|
||||
if (ENABLE_V4L2 AND NOT ENABLE_PROTOBUF)
|
||||
message(FATAL_ERROR "V4L2 grabber requires PROTOBUF. Disable V4L2 or enable PROTOBUF")
|
||||
endif (ENABLE_V4L2 AND NOT ENABLE_PROTOBUF)
|
||||
|
||||
# Createt the configuration file
|
||||
# configure a header file to pass some of the CMake settings
|
||||
# to the source code
|
||||
@@ -54,12 +61,14 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wall")
|
||||
# Configure the use of QT4
|
||||
find_package(Qt4 COMPONENTS QtCore QtGui QtNetwork REQUIRED QUIET)
|
||||
|
||||
# add protocol buffers (make sure to find the static version)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES_OLD ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||
find_package(Protobuf REQUIRED)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_OLD})
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES_OLD)
|
||||
if (ENABLE_PROTOBUF)
|
||||
# add protocol buffers (make sure to find the static version)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES_OLD ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||
find_package(Protobuf REQUIRED)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_OLD})
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES_OLD)
|
||||
endif (ENABLE_PROTOBUF)
|
||||
|
||||
#add libusb and pthreads
|
||||
find_package(libusb-1.0 REQUIRED)
|
||||
|
Reference in New Issue
Block a user