mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-22 09:31:10 -05:00
Add liblz4 dependency for sdrdaemon plugin
This commit is contained in:
parent
e4f97e1a1b
commit
1850452601
27
cmake/Modules/FindLZ4.cmake
Normal file
27
cmake/Modules/FindLZ4.cmake
Normal file
@ -0,0 +1,27 @@
|
||||
INCLUDE(FindPkgConfig)
|
||||
PKG_CHECK_MODULES(PC_LZ4 "liblz4")
|
||||
|
||||
FIND_PATH(LZ4_INCLUDE_DIRS
|
||||
NAMES lz4.h
|
||||
HINTS ${PC_LZ4_INCLUDE_DIR}
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
${LIBLZ4_INSTALL_PREFIX}/include
|
||||
PATHS
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LZ4_LIBRARIES
|
||||
NAMES lz4 liblz4
|
||||
HINTS ${PC_LZ4_LIBDIR}
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
${CMAKE_INSTALL_PREFIX}/lib64
|
||||
PATHS
|
||||
${LZ4_INCLUDE_DIRS}/../lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARIES LZ4_INCLUDE_DIRS)
|
||||
MARK_AS_ADVANCED(LZ4_LIBRARIES LZ4_INCLUDE_DIRS)
|
@ -1,5 +1,7 @@
|
||||
project(sdrdaemon)
|
||||
|
||||
find_package(LZ4)
|
||||
|
||||
set(sdrdaemon_SOURCES
|
||||
sdrdaemongui.cpp
|
||||
sdrdaemoninput.cpp
|
||||
@ -40,9 +42,14 @@ add_library(inputsdrdaemon SHARED
|
||||
${sdrdaemon_FORMS_HEADERS}
|
||||
)
|
||||
|
||||
target_include_directories(inputsdrdaemon PUBLIC
|
||||
${LZ4_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
target_link_libraries(inputsdrdaemon
|
||||
${QT_LIBRARIES}
|
||||
${LIBUSB_LIBRARIES}
|
||||
${LZ4_LIBRARIES}
|
||||
sdrbase
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user