Skip to content

Commit

Permalink
Require mbelib if USE_MBELIB is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
argilo committed Mar 13, 2024
1 parent 75c5b94 commit 102b3c7
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,12 @@ else()
set(CMAKE_BUILD_TYPE "Release")
endif()

find_package(LibMbe)
find_package(SerialDV)

if (USE_MBELIB AND LIBMBE_FOUND)
if (USE_MBELIB)
find_package(LibMbe REQUIRED)
add_definitions(-DDSD_USE_MBELIB)
endif()

find_package(SerialDV)
if (LIBSERIALDV_FOUND)
add_definitions(-DDSD_USE_SERIALDV)
endif()
Expand Down Expand Up @@ -133,7 +132,7 @@ set(dsdcc_HEADERS
export.h
)

if (USE_MBELIB AND LIBMBE_FOUND)
if (USE_MBELIB)
set(dsdcc_HEADERS
${dsdcc_HEADERS}
dsd_mbelib.h
Expand All @@ -145,7 +144,7 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}
)

if (USE_MBELIB AND LIBMBE_FOUND)
if (USE_MBELIB)
include_directories(
${LIBMBE_INCLUDE_DIR}
)
Expand All @@ -162,7 +161,7 @@ add_library(dsdcc SHARED
)
set_target_properties(dsdcc PROPERTIES VERSION ${VERSION} SOVERSION ${MAJOR_VERSION})

if (USE_MBELIB AND LIBMBE_FOUND)
if (USE_MBELIB)
target_link_libraries(dsdcc ${LIBMBE_LIBRARY})
endif()

Expand Down

0 comments on commit 102b3c7

Please sign in to comment.