-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: Specify cmake version + Fix finding Python development module
- Loading branch information
1 parent
8d788b3
commit 992b14c
Showing
12 changed files
with
32 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
# Copyright (c) 2016-2024, Olivier Martin <[email protected]> | ||
# | ||
|
||
cmake_minimum_required(VERSION 3.4) | ||
cmake_minimum_required(VERSION 3.25.1) | ||
|
||
# Add Cross-Compilation support when the environment variables | ||
# CROSS_COMPILE and SYSROOT are defined | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# GattLib - GATT Library | ||
# | ||
# Copyright (C) 2016-2021 Olivier Martin <[email protected]> | ||
# Copyright (C) 2016-2024 Olivier Martin <[email protected]> | ||
# | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
|
@@ -19,14 +19,14 @@ | |
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
# | ||
|
||
cmake_minimum_required(VERSION 2.8.12) | ||
cmake_minimum_required(VERSION 3.25.1) | ||
|
||
find_package(PkgConfig REQUIRED) | ||
|
||
message("Build gattlib for Bluez v${BLUEZ_VERSION_MAJOR}.${BLUEZ_VERSION_MINOR}") | ||
|
||
set(bluez4_DIR bluez4) | ||
set(bluez5_DIR bluez5) | ||
set(bluez5_DIR bluez5) | ||
|
||
# Bluez specific files | ||
set(bluez4_SRCS ${bluez4_DIR}/attrib/att.c | ||
|
@@ -109,12 +109,12 @@ include(GNUInstallDirs) | |
if(GATTLIB_SHARED_LIB) | ||
add_library(gattlib SHARED ${gattlib_SRCS}) | ||
target_link_libraries(gattlib ${gattlib_LIBS}) | ||
|
||
install(TARGETS gattlib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
else() | ||
add_library(gattlib ${gattlib_SRCS}) | ||
target_include_directories(gattlib INTERFACE ../include) | ||
target_link_libraries(gattlib ${gattlib_LIBS}) | ||
|
||
install(TARGETS gattlib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
# Copyright (c) 2016-2024, Olivier Martin <[email protected]> | ||
# | ||
|
||
cmake_minimum_required(VERSION 3.0) | ||
cmake_minimum_required(VERSION 3.25.1) | ||
|
||
find_package(PkgConfig REQUIRED) | ||
|
||
|
@@ -102,12 +102,14 @@ if(GATTLIB_PYTHON_INTERFACE) | |
else() | ||
set(Python_USE_STATIC_LIBS TRUE) | ||
endif() | ||
find_package(Python COMPONENTS Interpreter Development) | ||
if (Python_Development_FOUND) | ||
include_directories(${Python_INCLUDE_DIRS}) | ||
list(APPEND gattlib_LIBS ${Python_LIBRARIES}) | ||
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}) | ||
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") | ||
endif() | ||
endif() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# GattLib - GATT Library | ||
# | ||
# Copyright (C) 2016-2021 Olivier Martin <[email protected]> | ||
# Copyright (C) 2016-2024 Olivier Martin <[email protected]> | ||
# | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
|
@@ -19,7 +19,7 @@ | |
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
# | ||
|
||
cmake_minimum_required(VERSION 2.8.12) | ||
cmake_minimum_required(VERSION 3.25.1) | ||
|
||
find_package(PkgConfig REQUIRED) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# GattLib - GATT Library | ||
# | ||
# Copyright (C) 2016-2021 Olivier Martin <[email protected]> | ||
# Copyright (C) 2016-2024 Olivier Martin <[email protected]> | ||
# | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
|
@@ -19,7 +19,7 @@ | |
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
# | ||
|
||
cmake_minimum_required(VERSION 2.8.12) | ||
cmake_minimum_required(VERSION 3.25.1) | ||
|
||
find_package(PkgConfig REQUIRED) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# GattLib - GATT Library | ||
# | ||
# Copyright (C) 2016-2021 Olivier Martin <[email protected]> | ||
# Copyright (C) 2016-2024 Olivier Martin <[email protected]> | ||
# | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
|
@@ -19,7 +19,7 @@ | |
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
# | ||
|
||
cmake_minimum_required(VERSION 2.8.12) | ||
cmake_minimum_required(VERSION 3.25.1) | ||
|
||
find_package(PkgConfig REQUIRED) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# GattLib - GATT Library | ||
# | ||
# Copyright (C) 2016-2021 Olivier Martin <[email protected]> | ||
# Copyright (C) 2016-2024 Olivier Martin <[email protected]> | ||
# | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
|
@@ -19,7 +19,7 @@ | |
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
# | ||
|
||
cmake_minimum_required(VERSION 2.8.12) | ||
cmake_minimum_required(VERSION 3.25.1) | ||
|
||
find_package(PkgConfig REQUIRED) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# GattLib - GATT Library | ||
# | ||
# Copyright (C) 2016-2021 Olivier Martin <[email protected]> | ||
# Copyright (C) 2016-2024 Olivier Martin <[email protected]> | ||
# | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
|
@@ -19,7 +19,7 @@ | |
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
# | ||
|
||
cmake_minimum_required(VERSION 2.8.12) | ||
cmake_minimum_required(VERSION 3.25.1) | ||
|
||
find_package(PkgConfig REQUIRED) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# GattLib - GATT Library | ||
# | ||
# Copyright (C) 2016-2021 Olivier Martin <[email protected]> | ||
# Copyright (C) 2016-2024 Olivier Martin <[email protected]> | ||
# | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
|
@@ -19,7 +19,7 @@ | |
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
# | ||
|
||
cmake_minimum_required(VERSION 2.8.12) | ||
cmake_minimum_required(VERSION 3.25.1) | ||
|
||
find_package(PkgConfig REQUIRED) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# GattLib - GATT Library | ||
# | ||
# Copyright (C) 2016-2021 Olivier Martin <[email protected]> | ||
# Copyright (C) 2016-2024 Olivier Martin <[email protected]> | ||
# | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
|
@@ -19,7 +19,7 @@ | |
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
# | ||
|
||
cmake_minimum_required(VERSION 2.8.12) | ||
cmake_minimum_required(VERSION 3.25.1) | ||
|
||
find_package(PkgConfig REQUIRED) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# GattLib - GATT Library | ||
# | ||
# Copyright (C) 2016-2021 Olivier Martin <[email protected]> | ||
# Copyright (C) 2016-2024 Olivier Martin <[email protected]> | ||
# | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
|
@@ -19,7 +19,7 @@ | |
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
# | ||
|
||
cmake_minimum_required(VERSION 2.8.12) | ||
cmake_minimum_required(VERSION 3.25.1) | ||
|
||
find_package(PkgConfig REQUIRED) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# | ||
# GattLib - GATT Library | ||
# | ||
# Copyright (C) 2016-2021 Olivier Martin <[email protected]> | ||
# Copyright (C) 2016-2024 Olivier Martin <[email protected]> | ||
# | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
|
@@ -19,7 +19,7 @@ | |
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
# | ||
|
||
cmake_minimum_required(VERSION 2.8.12) | ||
cmake_minimum_required(VERSION 3.25.1) | ||
|
||
find_package(PkgConfig REQUIRED) | ||
|
||
|