15b54b6841
HackRF One from Great Scott Gadgets is a Software Defined Radio peripheral capable of transmission or reception of radio signals from 10 MHz to 6 GHz. Designed to enable test and development of modern and next generation radio technologies, HackRF One is an open source hardware platform that can be used as a USB peripheral or programmed for stand-alone operation. WWW: https://greatscottgadgets.com/hackrf/ PR: 199281 Submitted by: Tomek CEDRO <cederom@tlen.pl> Reviewed by: Nicolas Blais <nicblais@clkroot.net>
50 lines
1.5 KiB
Text
50 lines
1.5 KiB
Text
--- host/libhackrf/CMakeLists.txt.orig 2014-08-28 17:34:30 UTC
|
|
+++ host/libhackrf/CMakeLists.txt
|
|
@@ -34,7 +34,7 @@ if(MSVC)
|
|
set(THREADS_USE_PTHREADS_WIN32 true)
|
|
else()
|
|
add_definitions(-Wall)
|
|
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu90")
|
|
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
|
|
|
INCLUDE(TestBigEndian)
|
|
TEST_BIG_ENDIAN(BIGENDIAN)
|
|
@@ -68,8 +68,13 @@ ENDIF(CMAKE_CROSSCOMPILING)
|
|
|
|
set(prefix ${CMAKE_INSTALL_PREFIX})
|
|
set(exec_prefix \${prefix})
|
|
-set(libdir \${exec_prefix}/lib)
|
|
+set(libdir \${exec_prefix}/lib${LIB_SUFFIX})
|
|
set(includedir \${prefix}/include)
|
|
+set(libpkgdata "lib"${LIB_SUFFIX})
|
|
+
|
|
+if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
|
+ set(libpkgdata "libdata")
|
|
+endif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
|
|
|
CONFIGURE_FILE(
|
|
${CMAKE_CURRENT_SOURCE_DIR}/libhackrf.pc.in
|
|
@@ -78,7 +83,7 @@ CONFIGURE_FILE(
|
|
|
|
INSTALL(
|
|
FILES ${CMAKE_CURRENT_BINARY_DIR}/libhackrf.pc
|
|
- DESTINATION lib/pkgconfig
|
|
+ DESTINATION ${libpkgdata}/pkgconfig
|
|
)
|
|
|
|
########################################################################
|
|
@@ -100,9 +105,13 @@ endif()
|
|
########################################################################
|
|
option(INSTALL_UDEV_RULES "Install udev rules for HackRF" OFF)
|
|
if (INSTALL_UDEV_RULES)
|
|
+ if (NOT UDEV_INSTALL_DIR)
|
|
+ set (UDEV_INSTALL_DIR "/etc/udev/rules.d")
|
|
+ endif (NOT UDEV_INSTALL_DIR)
|
|
+
|
|
install (
|
|
FILES 53-hackrf.rules
|
|
- DESTINATION "/etc/udev/rules.d"
|
|
+ DESTINATION ${UDEV_INSTALL_DIR}
|
|
COMPONENT "udev"
|
|
)
|
|
else (INSTALL_UDEV_RULES)
|