Skip to content

Commit

Permalink
TODo: RemoveMe
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviermartin committed Feb 21, 2024
1 parent d533aeb commit 22364e5
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions dbus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,17 @@ if(GATTLIB_PYTHON_INTERFACE)
set(Python_USE_STATIC_LIBS TRUE)
endif()
find_package(Python COMPONENTS Development.Module)
if (Python_Development.Module_FOUND)
include_directories(${Python_INCLUDE_DIRS})
list(APPEND gattlib_LIBS ${Python_LIBRARIES})

add_definitions(-DWITH_PYTHON -DPYTHON_VERSION_MAJOR=${Python_VERSION_MAJOR} -DPYTHON_VERSION_MINOR=${Python_VERSION_MINOR})
else()
message(FATAL_ERROR "Could not find Python developer package")
if (NOT Python_Development.Module_FOUND)
find_package(Python COMPONENTS Interpreter Development)
if (NOT Python_Development.Module_FOUND)
message(FATAL_ERROR "Could not find Python developer package")
endif()
endif()

include_directories(${Python_INCLUDE_DIRS})
list(APPEND gattlib_LIBS ${Python_LIBRARIES})

add_definitions(-DWITH_PYTHON -DPYTHON_VERSION_MAJOR=${Python_VERSION_MAJOR} -DPYTHON_VERSION_MINOR=${Python_VERSION_MINOR})
endif()

# Gattlib
Expand Down

0 comments on commit 22364e5

Please sign in to comment.