Skip to content

Commit

Permalink
[AITT] find library using pkgconfig
Browse files Browse the repository at this point in the history
Use pkgconfig to find AITT library.

Signed-off-by: Jaeyun Jung <[email protected]>
  • Loading branch information
jaeyun-jung committed Dec 4, 2023
1 parent ef28883 commit 698e35c
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ IF(ENABLE_TIZEN)
SET(REQUIRE_PKGS "${REQUIRE_PKGS} dlog")
ENDIF()

# AITT Library
IF(AITT_SUPPORT)
SET(REQUIRE_PKGS "${REQUIRE_PKGS} aitt")
SET(NNS_EDGE_FLAGS "${NNS_EDGE_FLAGS} -DENABLE_AITT=1")
ENDIF()

IF(NOT ${REQUIRE_PKGS} STREQUAL "")
PKG_CHECK_MODULES(EDGE_REQUIRE_PKGS REQUIRED ${REQUIRE_PKGS})
ENDIF()
Expand Down Expand Up @@ -86,18 +92,6 @@ IF(MQTT_SUPPORT)
SET(NNS_EDGE_FLAGS "${NNS_EDGE_FLAGS} -DENABLE_MQTT=1")
ENDIF()

# AITT Library
IF(AITT_SUPPORT)
FIND_LIBRARY(AITT_LIB NAMES aitt)
IF(NOT AITT_LIB)
MESSAGE(FATAL_ERROR "Cannot find AITT library.")
ELSE()
MESSAGE("Found AITT library.")
SET(NNS_EDGE_FLAGS "${NNS_EDGE_FLAGS} -DENABLE_AITT=1")
SET(AITT_INCLUDE_DIR ${PREFIX}/include/aitt)
ENDIF()
ENDIF()

SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${NNS_EDGE_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NNS_EDGE_FLAGS}")

Expand Down

0 comments on commit 698e35c

Please sign in to comment.