diff options
author | Paul Elder <paul.elder@ideasonboard.com> | 2018-06-26 23:22:25 +0900 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-07-31 15:56:48 +0300 |
commit | 6a6e9d22b338bb2c290b7c7fd0ae434ad13232d9 (patch) | |
tree | 9f9a2a1d0f12881acc0f46e93a246eb90f39daba /CMakeLists.txt | |
parent | 35a4212180272b5dd648b99c07a692aab19a5e67 (diff) |
lib: Compile custom glob() implementation for Android
The Android C library doesn't provide the glob() function which we use
in the configfs code. Add conditional compilation to cmake such that a
local copy of glob is automatically compiled if glob isn't provided.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 79b78c4..29ab2c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,14 @@ set(CMAKE_BUILD_TYPE Release) #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -Werror") +include_directories(${CMAKE_BINARY_DIR}/generated) + add_subdirectory(lib) + +# Generate config.h +configure_file(${CMAKE_SOURCE_DIR}/include/config.h.in + ${CMAKE_BINARY_DIR}/generated/config.h) + add_executable(uvc-gadget main.c) target_link_libraries(uvc-gadget uvcgadget) install(TARGETS uvc-gadget DESTINATION bin) |