diff --git a/CMakeLists.txt b/CMakeLists.txt index bef06091..0db0e5ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.0.0 FATAL_ERROR) +cmake_minimum_required (VERSION 3.13.0 FATAL_ERROR) project (tinyb) FIND_PACKAGE (Threads REQUIRED) @@ -10,7 +10,6 @@ PKG_CHECK_MODULES (GIO-UNIX REQUIRED gio-unix-2.0>=2.40) set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra -fno-omit-frame-pointer -DDEBUG") set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall") -set (LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "Installation path for libraries") # Set CMAKE_LIB_INSTALL_DIR if not defined include(GNUInstallDirs) diff --git a/README.md b/README.md index e93b8189..77b87058 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,6 @@ https://software.intel.com/en-us/java-for-bluetooth-le-apps. Using TinyB ============ - TinyB requires CMake 3.1+ for building and requires GLib/GIO 2.40+. It also requires BlueZ with GATT profile activated, which is currently experimental (as of BlueZ 5.37), so you might have to run bluetoothd with the -E flag. For @@ -29,6 +28,10 @@ bluetooth.service file (usually found in /usr/lib/systemd/system/ or /lib/systemd/system) and append -E to ExecStart line, restart the daemon with systemctl restart bluetooth. +#### build requirements +* cmake 3.13 +* glib2.0-dev + ~~~~~~~~~~~~~{.sh} mkdir build cd build diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 238549ec..f7818b4f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -53,7 +53,7 @@ macro (tinyb_CREATE_INSTALL_PKGCONFIG generated_file install_location) configure_file (${generated_file}.cmake ${CMAKE_CURRENT_BINARY_DIR}/${generated_file} @ONLY) install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${generated_file} DESTINATION ${install_location}) endmacro (tinyb_CREATE_INSTALL_PKGCONFIG) -tinyb_create_install_pkgconfig (tinyb.pc lib${LIB_SUFFIX}/pkgconfig) +tinyb_create_install_pkgconfig (tinyb.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig) install(TARGETS tinyb LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/tinyb.pc.cmake b/src/tinyb.pc.cmake index 1c9fbaf8..3a6f853d 100644 --- a/src/tinyb.pc.cmake +++ b/src/tinyb.pc.cmake @@ -1,6 +1,6 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=${prefix} -libdir=${exec_prefix}/lib@LIB_SUFFIX@ +libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ includedir=${prefix}/include Name: tinyb