Fix problems with CMake build on ARM/Linux
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f6a18ce..1be3bd8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -130,6 +130,9 @@
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
TARGET_LINK_LIBRARIES(cpuinfo PUBLIC ${CMAKE_THREAD_LIBS_INIT})
ENDIF()
+IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE -D_GNU_SOURCE)
+ENDIF()
IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv7|armv7f|armv7s|armv7k|arm64)$")
TARGET_LINK_LIBRARIES(cpuinfo INTERFACE "-framework OpenGLES")
TARGET_LINK_LIBRARIES(cpuinfo INTERFACE "-framework Foundation")
@@ -165,6 +168,9 @@
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
TARGET_LINK_LIBRARIES(cpuinfo_mock PUBLIC ${CMAKE_THREAD_LIBS_INIT})
ENDIF()
+ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ TARGET_COMPILE_DEFINITIONS(cpuinfo_mock PRIVATE -D_GNU_SOURCE)
+ ENDIF()
IF(CMAKE_SYSTEM_NAME STREQUAL "Android" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv5te|armv7-a)$")
ADD_EXECUTABLE(blu-r1-hd-test test/mock/blu-r1-hd.cc)