Skip to content

Commit

Permalink
libini added as a submodule and compiled/linked directly into libiio.
Browse files Browse the repository at this point in the history
Signed-off-by: Matej Kenda <[email protected]>
  • Loading branch information
matejk committed Mar 17, 2020
1 parent 5e58241 commit c5cdbed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "deps/wingetopt"]
path = deps/wingetopt
url = https://github.com/alex85k/wingetopt.git
[submodule "deps/libini"]
path = deps/libini
url = https://github.com/pcercuei/libini.git
12 changes: 4 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,10 @@ if(WITH_LOCAL_BACKEND)

option(WITH_LOCAL_CONFIG "Read local context attributes from /etc/libiio.ini" OFF)
if (WITH_LOCAL_CONFIG)
find_library(LIBINI_LIBRARIES ini)
find_path(LIBINI_INCLUDE_DIR ini.h)
if (NOT LIBINI_LIBRARIES OR NOT LIBINI_INCLUDE_DIR)
message(SEND_ERROR "WITH_LOCAL_CONFIG option requires libini to be installed")
else()
include_directories(${LIBINI_INCLUDE_DIR})
list(APPEND LIBS_TO_LINK ${LIBINI_LIBRARIES})
endif()
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/deps/libini)
set(LIBINI_C_FILE ${CMAKE_CURRENT_SOURCE_DIR}/deps/libini/libini.c)

list(APPEND LIBIIO_CFILES ${LIBINI_C_FILE})
endif()
endif()

Expand Down
1 change: 1 addition & 0 deletions deps/libini
Submodule libini added at c3413d

0 comments on commit c5cdbed

Please sign in to comment.